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

Add more help to "template" flags #6296

Merged
merged 1 commit into from
Oct 4, 2022
Merged

Add more help to "template" flags #6296

merged 1 commit into from
Oct 4, 2022

Conversation

heaths
Copy link
Contributor

@heaths heaths commented Sep 18, 2022

Resolves #6089

@heaths heaths requested a review from a team as a code owner September 18, 2022 06:13
@heaths heaths requested review from vilmibm and removed request for a team September 18, 2022 06:13
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Sep 18, 2022
@cliAutomation cliAutomation added this to Needs review 🤔 in The GitHub CLI Sep 18, 2022
The GitHub CLI automation moved this from Needs review 🤔 to Needs to be merged 🎉 Sep 19, 2022
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving this!

@@ -219,7 +219,7 @@ func NewCmdApi(f *cmdutil.Factory, runF func(*ApiOptions) error) *cobra.Command
cmd.Flags().BoolVar(&opts.Paginate, "paginate", false, "Make additional HTTP requests to fetch all pages of results")
cmd.Flags().StringVar(&opts.RequestInputFile, "input", "", "The `file` to use as body for the HTTP request (use \"-\" to read from standard input)")
cmd.Flags().BoolVar(&opts.Silent, "silent", false, "Do not print the response body")
cmd.Flags().StringVarP(&opts.Template, "template", "t", "", "Format the response using a Go template")
cmd.Flags().StringVarP(&opts.Template, "template", "t", "", "Format JSON output using a Go template; see \"gh help formatting\"")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line of docs gets automatically added to any command that has a --template flag:

For more information about output formatting flags, see `gh help formatting`.

Do you think it's also worth pointing this out in the description of the flag itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, not much. But see the linked bug for the discussion that lead to this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping

Copy link
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with the redundancy; I think people are missing the other hint and this new hint is exactly where people will be looking.

@vilmibm vilmibm merged commit b2d1955 into cli:trunk Oct 4, 2022
The GitHub CLI automation moved this from Needs to be merged 🎉 to Pending Release 🥚 Oct 4, 2022
@heaths heaths deleted the issue6089 branch October 4, 2022 19:58
@github-actions github-actions bot moved this from Pending Release 🥚 to Done 💤 in The GitHub CLI Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external pull request originating outside of the CLI core team
Projects
No open projects
The GitHub CLI
  
Done 💤
Development

Successfully merging this pull request may close these issues.

Explain how to use git pr list --template feature, or at least give some hints and an example
5 participants