Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply defaults when a plugin fetches the config #12391

Open
mattermod opened this issue Sep 27, 2019 · 8 comments
Open

Apply defaults when a plugin fetches the config #12391

mattermod opened this issue Sep 27, 2019 · 8 comments
Assignees
Labels
Area/Toolkit Plugins and integrations framework Difficulty/2:Medium Medium ticket Hacktoberfest Help Wanted Community help wanted PR Exists Tech/Go Server

Comments

@mattermod
Copy link
Contributor

mattermod commented Sep 27, 2019

Plugins may specify a schema for their configuration in plugin.json, e.g. https://github.com/mattermost/mattermost-plugin-demo/blob/4e6fa3aa03bc58d62d1ceb3207c293d6641ea12a/plugin.json#L17. This schema optionally specifies default values, but currently don’t get returned when the plugin asks for its own configuration.

Change GetConfig and GetUnsanitizedConfig – and implicitly GetPluginConfig – to apply these default values as specified in each plugin’s manifest. Of course, if a plugin has been configured, the default value will be ignored.

See original discussion at https://community.mattermost.com/core/pl/gmiode43otb6pnhrbp61ysuy7c


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-9614

@Sheshagiri
Copy link
Contributor

I would like to give this a try.

@hanzei
Copy link
Contributor

hanzei commented Oct 2, 2019

Thanks for working on this @Sheshagiri 🎉

@hanzei hanzei added the Area/Toolkit Plugins and integrations framework label Oct 8, 2019
@hanzei
Copy link
Contributor

hanzei commented Oct 23, 2019

Hey @Sheshagiri,

Are you still working on this issue? Can we help with anything?

@igomonov88
Copy link
Contributor

I can try to do it

@hanzei
Copy link
Contributor

hanzei commented Nov 27, 2019

Go ahead @igomonov88 👍

@hanzei hanzei assigned igomonov88 and unassigned Sheshagiri Nov 27, 2019
@igomonov88
Copy link
Contributor

@hanzei hello, just quick status update, I'm actually start working on this ticket only today, and keep going. Can we have a chat if I get any problems and stuck with them for a long time?

@hanzei
Copy link
Contributor

hanzei commented Dec 2, 2019

Surely @igomonov88. Feel free to reach out to me on the Mattermost Community Server.

@jasonblais
Copy link
Contributor

Hey @igomonov88, let us know if you have any questions so far?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Toolkit Plugins and integrations framework Difficulty/2:Medium Medium ticket Hacktoberfest Help Wanted Community help wanted PR Exists Tech/Go Server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants