-
Notifications
You must be signed in to change notification settings - Fork 71
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
Adds an optional config section to the help ouput for bundles #1011
Conversation
34e22b4
to
06d4224
Compare
@@ -8,6 +8,13 @@ defmodule Cog.Chat.Slack.Templates.Embedded.HelpBundleTest do | |||
"commands" => [%{"name" => "test-command", | |||
"description" => "does just one thing"}], | |||
"author" => "vanstee", | |||
"config_file" => %{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a little weird. I know we don't have a db column for this stuff, but it'd still be nice if we rendered it all as if it was one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand. Are you saying that we should add virtual fields for the config bits? I don't think that would change the test here, would it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I think I misunderstood what was going on here. But it still seems weird that we need access to the config_file
in the template. I'd be happier if we rendered the config
key in the json as if it was a normal model attribute. This is probably fine though.
~end~ | ||
~br~ | ||
~end~ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since config is typically "set and forget" I think it should probably go near the bottom. Maybe just above the homepage and author.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's actually why I put it at the top. I was thinking that the most important stuff was the command bits and I didn't want them to get pushed off the screen.
This adds an optional config section to the help output for bundles. The section contains notes and a list of env vars. Both notes and env vars are optional.
Note that I didn't add the config section info to the bundle version model. I'm just pulling straight from the config file in the template. Since the data was already available in the config file and it's not used anywhere else right now, I figured that was the easiest solution.
Example config.yaml excert:
Help output:

resolves #948
depends on operable/spanner#77