mattermost / mattermost

Mattermost is an open source platform for secure collaboration across the entire software development lifecycle..
https://mattermost.com
Other
30.01k stars 7.19k forks source link

Add plugin API to allow plugins to fetch their own pluginID #26710

Closed mattermod closed 2 weeks ago

mattermod commented 5 months ago

The plugin API should expose a method that allows plugins to fetch their own ID. While this method might not be useful on its own, it adds flexibility with writing higher-level helper methods like the ones found in the pluginapi packet. The method signature should be GetPluginID() string.

If you have any questions, please reach out to @hanzei either in this ticket or on the Mattermost Community server.


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-57738

abhisenberg commented 5 months ago

I want to contribute to this!

hanzei commented 5 months ago

Awesome, thanks @abhisenberg :+1:

willypuzzle commented 3 months ago

There is any progress? I would grab this issue if no one is working on it. @hanzei @abhisenberg @amyblais

mickmister commented 3 months ago

Reopening due to https://github.com/mattermost/mattermost/pull/27281#issuecomment-2161029136

willypuzzle commented 3 months ago

if for you is ok I proceed with https://github.com/mattermost/mattermost/pull/27281#issuecomment-2161029136 @mickmister @hanzei , ok?

mickmister commented 3 months ago

@willypuzzle Yes you are good :+1:

willypuzzle commented 3 months ago

@mickmister should I clear the GetPluginID method out from Manifest (and the relative code) or can I keep it?

mickmister commented 3 months ago

@willypuzzle The GetPluginID method is a great improvementthat we should keep :+1:

mickmister commented 3 months ago

@willypuzzle It seems this is already available through the pluginapi package https://github.com/mattermost/mattermost/blob/1d704745b70dd1f92d6c89d70307d75f2b5fbb33/server/public/pluginapi/system.go#L23

I'm thinking we should close the issue as there is already a supported capability to get the plugin's id. @willypuzzle @fmartingr What do you think?

willypuzzle commented 3 months ago

@willypuzzle It seems this is already available through the pluginapi package https://github.com/mattermost/mattermost/blob/1d704745b70dd1f92d6c89d70307d75f2b5fbb33/server/public/pluginapi/system.go#L23

I'm thinking we should close the issue as there is already a supported capability to get the plugin's id. @willypuzzle @fmartingr What do you think?

Yes, I agree!

fmartingr commented 3 months ago

Closing due to GetManifest already being implemented Thank you everyone for your work here.

hanzei commented 1 month ago

Reopening as https://github.com/mattermost/mattermost/pull/27281 got reverted.

willypuzzle commented 1 month ago

if you agree I can try again

hanzei commented 1 month ago

Absolutely, go for it @willypuzzle! Please let me know if you need any help or clarification.

willypuzzle commented 1 month ago

@hanzei should I add GetPluginId() to API interface?

hanzei commented 1 month ago

@willypuzzle Indeed. Please check out https://developers.mattermost.com/contribute/more-info/server/plugins/ for more details on how to add a new API method.