Commit graph

30 commits

Author SHA1 Message Date
Yukai Chou
687a43fe89 Drop surplus trailing space char in flag names in web
Introduced by 92cb2cc7 (more closely match cobra default val display,
2023-12-05).
2024-08-23 02:15:07 +08:00
Prabhat Kumar Sahu
1886fb46ab
Fix pr checks exit code (#9452)
* Enhance  with exit code documentation

* Add new error message for PR check

* Refine gh pr checks: Add exit code 8

* Update EXIT CODES section format in man page generation
2024-08-16 14:30:11 -07:00
gabemontero
39e4cbd973 update generated content for man pages and website 2024-05-17 09:30:53 -04:00
Babak K. Shandiz
05a87b9664
Add test to verify JSON fields section is rendered in Markdown
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 18:01:12 +01:00
Babak K. Shandiz
ad71f8cf9f
Output JSON Fields section in Markdown
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 18:00:54 +01:00
Babak K. Shandiz
5b99a4a2ec
Add test to verify JSON fields section is rendered
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 17:57:50 +01:00
Babak K. Shandiz
b445adae20
Add jsonCmd test command variable
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 17:57:12 +01:00
Babak K. Shandiz
2b304a5e84
Output JSON Fields section
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 17:56:37 +01:00
Zack Sloane
b6dadfa7fb test update, more consistent default value display 2024-01-08 23:23:24 -05:00
Zack Sloane
857cd49040 fix special cases for duration flags 2023-12-05 23:33:01 -05:00
Zack Sloane
92cb2cc78d more closely match cobra default val display 2023-12-05 22:21:53 -05:00
Zack Sloane
aae4a00769 Add default values to docs (web and man pages) 2023-11-30 16:28:51 -05:00
Mislav Marohnić
278ff59fce
Allow accessing Cobra built-in doc generation features
Setting GH_COBRA allows access to Cobra's built-in implementation of generating man pages and markdown trees. This is useful for testing and comparing our overrides against Cobra's own logic.
2022-11-09 17:30:32 +01:00
Mislav Marohnić
b12ea845ef
Migrate to the new Cobra command grouping feature 2022-11-09 16:42:13 +01:00
Mislav Marohnić
6e9974c2ef Escape liquid tags in site docs
It is good practice to wrap all dynamic content in `{% raw %}..{% endraw %}`
Liquid tags so that no syntax within can mistakenly get interpreted as
Liquid tags. Fixes rendering of `gh auth login` help page.
2022-09-19 15:50:51 +02:00
Abirdcfly
b998f3912d
remove duplicate "the" words in comments 2022-08-21 11:11:39 +08:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Mislav Marohnić
31c7181297 Refresh man pages
- Fix name of man pages for all but the toplevel command
- Set title of all man pages to "GitHub CLI manual"
- Include gh version information in man pages
- Clean up rendering of flags section
- List subcommands for every command
2021-12-20 18:11:31 +01:00
meiji163
206896c6b4 fix angle brackets 2021-11-17 13:33:34 -08:00
Mislav Marohnić
a7254ac43f Improve markdown rendering of man pages for commands
- "Examples" section now renders with syntax highlighting and doesn't
  interpret curly braces as Liquid tags anymore
- Flags are now listed with nicer formatting than just being rendered to
  a plain text block
- Flags are now listed above the "Examples" section
- The `--help` flag is no longer explicitly and repetitively being
  listed as an inherited flag under every command
- Usage synopsis line is now rendered early in the documentation for a
  command
- Every command that has subcommands now explicitly lists those
  subcommands in its documentation
2021-11-03 16:59:14 +01:00
Mislav Marohnić
8cc77bd61e Fix test expectation for man contents
https://github.com/cpuguy83/go-md2man/pull/74
2021-10-11 18:05:52 +02:00
Cristian Dominguez
2f94adabb2
Use T.TempDir for temporary dirs in tests (#3580) 2021-05-07 12:21:26 +02:00
Josh Soref
8ba68fc68a spelling: deprecated 2020-11-21 21:43:51 -05:00
Sam Coe
86906c6769
Small cleanup 2020-11-04 12:40:40 +03:00
Sam Coe
241e90aa9b
Make markdown:generate annotation a markdown generation override for hidden commands 2020-11-04 12:35:58 +03:00
Sam Coe
f770c6481c
Generate markdown for help topics 2020-11-04 12:35:58 +03:00
Sam Coe
52959abee1
Clean up and refactor unused doc generation code 2020-10-23 08:14:36 +02:00
Sam
f8ce68f062
Remove SEE ALSO from markdown docs generation 2020-10-22 12:59:11 +02:00
Sam
699c9ae131
Remove Cobra autogenerated string from docs generation 2020-10-22 12:59:11 +02:00
Sam
36949e263a Internalize doc generation from Cobra 2020-10-22 09:38:51 +00:00