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

[pull] trunk from cli:trunk #83

Open
wants to merge 1,198 commits into
base: trunk
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
1198 commits
Select commit Hold shift + click to select a range
a3ff779
Add tests to verify proper `help:json-fields` annotations
babakks May 6, 2024
9f9d041
Output `JSON FIELDS`
babakks May 6, 2024
2b304a5
Output `JSON Fields` section
babakks May 6, 2024
b445ada
Add `jsonCmd` test command variable
babakks May 6, 2024
5b99a4a
Add test to verify JSON fields section is rendered
babakks May 6, 2024
ad71f8c
Output `JSON Fields` section in Markdown
babakks May 6, 2024
05a87b9
Add test to verify JSON fields section is rendered in Markdown
babakks May 6, 2024
4ac966f
Fix test function name
babakks May 6, 2024
acef17d
Add `ComparePullRequestBaseBranchWith` function
babakks May 6, 2024
81df863
Check if PR branch is already up-to-date
babakks May 6, 2024
cec2ced
Improve query variable names
babakks May 6, 2024
119e58c
Update tests to account for ref comparison step
babakks May 6, 2024
8f8c775
Merge branch 'trunk' into 8426-add-pr-update-cmd-no-local-update
babakks May 6, 2024
5007c18
Fix unused params across project
williammartin May 7, 2024
08e8ee6
Merge pull request #9059 from cli/wm/fix-unused-params
williammartin May 8, 2024
c9e8fd6
Fix `attestation verify` source repository check bug (#9053)
malancas May 8, 2024
f11f096
Merge pull request #8934 from babakks/8588-improve-run-list-doc
andyfeller May 8, 2024
70acabc
Creating doc to capture Codespace usage guidance
andyfeller May 9, 2024
78091c4
Fix query parameter name
babakks May 9, 2024
859337f
Merge branch 'trunk' into 8426-add-pr-update-cmd-no-local-update
babakks May 9, 2024
6d9dd57
Fix typos
szepeviktor May 9, 2024
2543c22
Merge pull request #9068 from szepeviktor/typos
williammartin May 10, 2024
1d38230
Move config interfaces into gh package (#9060)
williammartin May 10, 2024
8a82e3a
Provide more type safety around config values
williammartin May 8, 2024
8a4f32b
Make config list less fallible
williammartin May 8, 2024
d0e436b
Avoid reconstructing config Options on each use
williammartin May 8, 2024
07e0ff7
Fix repo fork to use remote protocol if none configured
williammartin May 8, 2024
bc5329e
Fix mistaken find and replace for Option type
williammartin May 8, 2024
88631d1
Remove unnecessary config list variable
williammartin May 8, 2024
85e81a5
Comment further on config changes
williammartin May 10, 2024
a9fa140
Add further docs to Option type
williammartin May 10, 2024
b8529f4
Merge pull request #9066 from cli/andyfeller/codespace-edges-doc
andyfeller May 10, 2024
a47b96c
Merge pull request #9063 from cli/9058-gh-repo-fork-no-longer-respect…
williammartin May 10, 2024
af02889
Merge pull request #8987 from kuzdogan/patch-1
andyfeller May 10, 2024
b918967
build(deps): bump github.com/sigstore/protobuf-specs from 0.3.1 to 0.3.2
dependabot[bot] May 13, 2024
4b077da
Merge pull request #9075 from cli/dependabot/go_modules/github.com/si…
andyfeller May 13, 2024
178fc2e
feat: add json output for PR checks
nobe4 May 14, 2024
dabfb1e
Merge branch 'trunk' into pr_checks_json
nobe4 May 14, 2024
8a1995c
fix: rename fields list
nobe4 May 14, 2024
ac55103
Implement ExportData to filter json fields
andyfeller May 14, 2024
a6c0d3b
removed tty message
leevic31 May 15, 2024
a3d65e0
Extract units for configuring and updating git credential helpers
williammartin May 16, 2024
af589aa
Move fetching configured helper into gitcredentials
williammartin May 16, 2024
bd4ba5c
Make gitcredential helper smarter
williammartin May 16, 2024
177cf7d
Rename gitcredentials Configure to ConfigureOurs
williammartin May 16, 2024
c16836b
Use tighter interface in setup-git
williammartin May 16, 2024
818d4ba
Remove unnecessary credential setup private method
williammartin May 16, 2024
187c501
Comment the git credential flow
williammartin May 16, 2024
d75548a
Comment the new gitcredentials package
williammartin May 16, 2024
e07a26d
Move gitcredentials HelperConfig and add tests
williammartin May 16, 2024
37abb3e
Fix mistaken git installation error check
williammartin May 16, 2024
64d50e6
Add tests for gitcredentials Updater
williammartin May 16, 2024
3803fd0
Add Helper test for Windows
williammartin May 16, 2024
eb5dc7f
Merge pull request #9089 from cli/wm/refactor-git-credential-code
williammartin May 16, 2024
e14f0d7
Merge pull request #9079 from cli/pr_checks_json
andyfeller May 16, 2024
1dfcaab
Added TTY message to summarize checking extension upgrades
leevic31 May 16, 2024
e3d5c06
Added summary TTY message to tests
leevic31 May 16, 2024
222d6c8
Removed unused param flagDryRun from upgradeFunc
leevic31 May 16, 2024
6c3a461
Merge branch 'trunk' into 8535-remove-message-when-checking-for-exten…
leevic31 May 16, 2024
3ea937d
Inject GitCredentialFlow to LoginFlow as test seam
williammartin May 17, 2024
ba1afa2
Add HelperConfig contract test and FakeHelperConfig
williammartin May 17, 2024
540bda1
Test git credentials are configured in LoginFlow
williammartin May 17, 2024
3fe555b
Comment the purpose of the helper config contract
williammartin May 17, 2024
a372537
Remove TODO and add comment on LoginFlow tests
williammartin May 17, 2024
3b9f9a8
Merge pull request #9095 from cli/wm/rework-auth-tests-with-new-crede…
williammartin May 17, 2024
dd7ea5a
list the various alias permutations for the command and subcommands
gabemontero Mar 16, 2024
7dd35e7
Conditionalize references, remove redundant alias
andyfeller May 10, 2024
c265753
remove no-op if clause that returns 'No Aliases'
gabemontero May 10, 2024
77f964a
williammartin simplifications
gabemontero May 17, 2024
39e4cbd
update generated content for man pages and website
gabemontero May 17, 2024
f9722d8
Merge pull request #8824 from gabemontero/ggm-issue-8677-tinker
andyfeller May 17, 2024
ff3a598
Merge pull request #9088 from leevic31/8535-remove-message-when-check…
andyfeller May 20, 2024
630ab13
Merge branch 'trunk' into feature-macos-pkg-installer
paulober May 20, 2024
7dc7b98
Merge pull request #9052 from jasonodonnell/trunk
williammartin May 21, 2024
b1a6ce3
Update pkg title
paulober May 21, 2024
aeb0ac7
Update choice title
paulober May 21, 2024
eb23e07
Indentation fix
paulober May 21, 2024
f9d6b1d
Fix indentation
paulober May 21, 2024
80830d7
Fix indentation
paulober May 21, 2024
140edf7
feat: add support for stateReason in `gh pr view` (#9080)
nobe4 May 21, 2024
d2d599d
Undo goreleaser change
paulober May 21, 2024
6e58a2a
Fix indentation
paulober May 21, 2024
18f41db
Removed redundant specifications
paulober May 21, 2024
3830c33
Cleanup pkgmacos build script
paulober May 21, 2024
9454d5e
Change minimum build script macOS version
paulober May 21, 2024
105bafd
fix: rename the `Attempts` field to `Attempt`; expose in `gh run view…
cawfeecake May 22, 2024
e5e5c4f
Update regex in changedFilesNames to handle quoted paths
anda3 May 23, 2024
a66a646
Add comment to pr diff regex
williammartin May 23, 2024
99568e6
Merge pull request #9115 from anda3/feature/nonascii-path-regex-impro…
williammartin May 23, 2024
08a5589
Add a `gh variable get FOO` command (#9106)
arnested May 23, 2024
85f424b
Fix directory already exists
paulober May 24, 2024
74392ff
Added make macospkg target
paulober May 24, 2024
1990952
Fix distribution.xml + min macos version requirements
paulober May 24, 2024
27262ff
Added native min os version blocking
paulober May 24, 2024
b2fead7
build(deps): bump github.com/gabriel-vasile/mimetype from 1.4.3 to 1.4.4
dependabot[bot] May 24, 2024
f66367d
Integrate argument array to remove duplicate code
paulober May 24, 2024
4db8779
Merge branch 'trunk' into feature-macos-pkg-installer
paulober May 24, 2024
279d53a
Remove `v` prefix when `pkgmacos` is called
andyfeller May 24, 2024
bdc40a0
Update readme about MacOS pkg
andyfeller May 24, 2024
1bc3cfa
Merge pull request #7555 from paulober/feature-macos-pkg-installer
andyfeller May 24, 2024
d821942
Move `Variable` type and `PopulateSelectedRepositoryInformation` func…
babakks May 25, 2024
2a5a4ce
Add tests for JSON output
babakks May 25, 2024
9d8b783
Use `Variable` type defined in `shared` package
babakks May 25, 2024
9654907
Add `--json` option support
babakks May 25, 2024
ab85baa
Add test to verify JSON exporter gets set
babakks May 25, 2024
840ddc5
Only populate selected repo information for JSON output
babakks May 25, 2024
7add5a4
Add test for JSON output
babakks May 25, 2024
43e3e94
Add test for exporting as JSON
babakks May 25, 2024
94dff4d
Add `createdAt` field to `Variable` type
babakks May 25, 2024
4aa6f8f
Add `createdAt` field to tests
babakks May 25, 2024
8d05186
Add integration tests for `gh attestation verify` shared workflow use…
malancas May 28, 2024
e550933
Add build provenance for gh CLI releases (#9087)
malancas May 28, 2024
f1dedc9
Merge pull request #9124 from cli/dependabot/go_modules/github.com/ga…
williammartin May 28, 2024
f3f93c6
Build completions during release on macos
williammartin May 28, 2024
3620e79
Merge pull request #9136 from cli/wm/fix-pkgmacos-completions
williammartin May 29, 2024
2bb9900
Clarify Mac OS Installer packages are unsigned
andyfeller May 29, 2024
faef2dd
Merge pull request #9140 from cli/andyfeller/cli-9139-sign-pkg-predocs
andyfeller May 29, 2024
fe880a3
Ensure signed RPMs have attestations
andyfeller May 29, 2024
22991ab
Merge pull request #9143 from cli/andyfeller-patch-1
williammartin May 30, 2024
cd5562f
Add `signer-repo` and `signer-workflow` flags to `gh attestation veri…
malancas May 30, 2024
fc8b86b
Specify rpm repository to avoid conflicts with community repositories
hbenali May 30, 2024
31a9d08
Merge pull request #9151 from hbenali/fix-fedora
andyfeller May 30, 2024
a10e532
feat: add `-a` flag to `gh run list`
joshuajtward Jun 3, 2024
3a1f385
Add GH_DEBUG to issue template
TWiStErRob Jun 4, 2024
215456e
build(deps): bump actions/attest-build-provenance from 1.1.2 to 1.2.0
dependabot[bot] Jun 4, 2024
e8a13cf
replaced deprecated --json-result flag with --format=json in the gh a…
phillmv Jun 4, 2024
58b459f
Merge pull request #9172 from cli/phillmv/fix-small-verify-flag-bug
phillmv Jun 4, 2024
d666248
build(deps): bump goreleaser/goreleaser-action from 5 to 6
dependabot[bot] Jun 5, 2024
e91860d
Bump go-keyring to fix keepassxc prompt confirmation
AlanD20 Jun 7, 2024
6f558c9
Merge pull request #9179 from AlanD20/bump-go-keyring
williammartin Jun 7, 2024
8ac5ad7
Merge branch 'trunk' into 8426-add-pr-update-cmd-no-local-update
babakks Jun 7, 2024
e36d8f1
Merge pull request #9169 from cli/dependabot/github_actions/actions/a…
williammartin Jun 10, 2024
1a470b3
build(deps): bump github.com/gorilla/websocket from 1.5.1 to 1.5.2
dependabot[bot] Jun 10, 2024
945b668
build(deps): bump google.golang.org/protobuf from 1.34.1 to 1.34.2
dependabot[bot] Jun 11, 2024
7cd4a15
Merge pull request #9175 from cli/dependabot/github_actions/gorelease…
andyfeller Jun 12, 2024
7d36c2d
Merge pull request #9192 from cli/dependabot/go_modules/github.com/go…
andyfeller Jun 12, 2024
04d0ec0
Merge pull request #9197 from cli/dependabot/go_modules/google.golang…
andyfeller Jun 12, 2024
c2f2753
add comment to call out potentially brittle use of workflowShared
joshuajtward Jun 13, 2024
f647131
Gracefully degrade when fetching annotations fails due to 403 (#9113)
wingleung Jun 13, 2024
6190e26
Add `gh run list` tests for workflow selector
andyfeller Jun 13, 2024
5e7ba54
Merge pull request #9162 from joshuajtward/chore/GH-9038
andyfeller Jun 13, 2024
307d07e
Update .github/ISSUE_TEMPLATE/bug_report.md
TWiStErRob Jun 13, 2024
59fae5b
build(deps): bump github.com/gorilla/websocket from 1.5.2 to 1.5.3
dependabot[bot] Jun 14, 2024
c572383
Attestation Verification - Buffer Fix (#9198)
Forrin Jun 14, 2024
f8e1271
Merge branch 'trunk' into 8426-add-pr-update-cmd-no-local-update
babakks Jun 16, 2024
6e77b2d
build(deps): bump github.com/spf13/cobra from 1.8.0 to 1.8.1
dependabot[bot] Jun 17, 2024
651d713
build(deps): bump actions/attest-build-provenance from 1.2.0 to 1.3.2
dependabot[bot] Jun 18, 2024
f71d3f7
Merge pull request #9222 from cli/dependabot/github_actions/actions/a…
andyfeller Jun 21, 2024
152607e
Removed beta note from `gh at verify`, clarified reusable workflows u…
phillmv Jun 24, 2024
40abc9a
Removed beta note from `gh at download`.
phillmv Jun 24, 2024
8318e7a
Actually, let's keep `download` in beta for now.
phillmv Jun 24, 2024
846b6ec
Fix whitespacing
williammartin Jun 24, 2024
d7c56bf
Remove beta note from attestation top level command
williammartin Jun 24, 2024
cdc8c4d
Merge pull request #9211 from cli/dependabot/go_modules/github.com/go…
williammartin Jun 24, 2024
31b424a
build(deps): bump github.com/google/go-containerregistry
dependabot[bot] Jun 24, 2024
f603231
Merge pull request #9218 from cli/dependabot/go_modules/github.com/sp…
williammartin Jun 24, 2024
06607d3
s/originated/caller/ workflow
phillmv Jun 24, 2024
ba2d32b
Merge pull request #9217 from cli/dependabot/go_modules/github.com/go…
williammartin Jun 24, 2024
c25dacc
Update pkg/cmd/attestation/verify/verify.go
phillmv Jun 24, 2024
c9f9fac
Update pkg/cmd/attestation/verify/verify.go
phillmv Jun 24, 2024
467550a
Merge pull request #9243 from cli/remove-attestation-public-beta
phillmv Jun 24, 2024
ee7bca6
build(deps): bump github.com/hashicorp/go-retryablehttp
dependabot[bot] Jun 24, 2024
812889f
Merge pull request #9128 from babakks/9118-add-json-fields-to-variabl…
williammartin Jun 25, 2024
85387fd
Update .github/ISSUE_TEMPLATE/bug_report.md
andyfeller Jun 25, 2024
70c3ca3
Merge pull request #9167 from TWiStErRob/patch-1
andyfeller Jun 25, 2024
d4e3385
Fetch variable selected repo relationship when required
williammartin Jun 25, 2024
c726703
Merge pull request #9256 from cli/9255-gh-variable-list-json-numselec…
andyfeller Jun 25, 2024
0f2e1ed
Merge pull request #9250 from cli/dependabot/go_modules/github.com/ha…
williammartin Jun 25, 2024
a994edd
Merge branch 'trunk' into 8426-add-pr-update-cmd-no-local-update
babakks Jun 27, 2024
f972050
gh attestation trusted-root subcommand (#9206)
steiza Jul 1, 2024
9b40e0c
Update create.go
cchristous Jul 7, 2024
0df5596
Merge pull request #9296 from cchristous/patch-1
williammartin Jul 8, 2024
8f77b4a
Add `issue create --editor`
notomo Mar 19, 2023
30b3286
Add prefer_editor_prompt config
notomo Jul 3, 2024
50d0cb7
Use prefer_editor_prompt config by `issue create`
notomo Jul 4, 2024
0d37174
Add editor hint message
notomo Jul 8, 2024
0b32e66
Enable to use --web even though editor is enabled by config
notomo Jul 9, 2024
4511a8b
build(deps): bump actions/attest-build-provenance from 1.3.2 to 1.3.3
dependabot[bot] Jul 10, 2024
172a9de
Ensure PR does not panic when stateReason is requested
williammartin Jul 11, 2024
3b2ba9e
docs: Update documentation for `gh repo create` to clarify owner
jessehouwing Jul 12, 2024
db733e1
Merge pull request #9305 from cli/dependabot/github_actions/actions/a…
williammartin Jul 12, 2024
ca1f2a4
Merge pull request #9309 from jessehouwing/docs/gh-repo-create-owner
williammartin Jul 12, 2024
940b54c
Add tests for JSON field support on issue and pr view commands
williammartin Jul 11, 2024
f44f9a4
Merge pull request #9307 from cli/wm/9160-stateReason-panic
williammartin Jul 12, 2024
28cc56c
Raise error if editor is used in non-tty mode
notomo Jul 13, 2024
ae5a71b
Merge branch 'trunk' into add-issue-create-editor
andyfeller Jul 15, 2024
9b7ee3a
Merge pull request #7193 from notomo/add-issue-create-editor
andyfeller Jul 15, 2024
c70479a
Merge branch 'trunk' into 8426-add-pr-update-cmd-no-local-update
babakks Jul 16, 2024
171e8d3
Print message on stdout instead of stderr
babakks Jul 16, 2024
1a6f598
Remove unused flag
babakks Jul 16, 2024
feb5aa5
Add separate type for `PullRequest.Mergeable` field
babakks Jul 16, 2024
28c72eb
Replace literals with consts for `Mergeable` field values
babakks Jul 16, 2024
497a915
Return error if PR is not mergeable
babakks Jul 16, 2024
5d2378d
Handle merge conflict error
babakks Jul 16, 2024
989152e
Add test case for merge conflict error
babakks Jul 16, 2024
b584895
Rename `gh pr update` to `gh pr update-branch`
babakks Jul 17, 2024
5b71586
Rename package name to `update_branch`
babakks Jul 17, 2024
5b918cf
Rename package directory and files
babakks Jul 17, 2024
d3d73d9
Merge pull request #8953 from babakks/8426-add-pr-update-cmd-no-local…
williammartin Jul 17, 2024
e0c03fc
Remove redundant whitespace
jessehouwing Jul 18, 2024
d02f58f
Merge pull request #9334 from jessehouwing/patch-1
williammartin Jul 18, 2024
a81a1f7
Remove attestation test that requires being online (#9340)
steiza Jul 19, 2024
17257df
Verify `--body` and `--body-file` are not assignable at the same time
babakks Jul 21, 2024
9dabc3b
Remove unused expected `output` from test case (with `wantsErr: true`)
babakks Jul 21, 2024
683576d
Add `--remove-milestone` option
babakks Jul 21, 2024
168a883
Assert correct parsing of `--remove-milestone` option
babakks Jul 21, 2024
42da8ba
Verify `--milestone` and `--remove-milestone` are not assignable at t…
babakks Jul 21, 2024
0a3a128
Exit with 1 on authentication failure
Stausssi Jun 23, 2024
a6a1a58
Update documentation for gh api PATCH
cmbuckley Jul 22, 2024
e760636
document exit code behavior
Stausssi Jul 22, 2024
a4da98d
Merge pull request #9352 from cmbuckley/docs-api-patch
williammartin Jul 22, 2024
32e499e
Add examples for template usage in PR and issue creation
williammartin Jul 23, 2024
8a0d361
Expose fullDatabaseId for PR json export
williammartin Jun 23, 2024
13dea3e
Add test for release view json export fields
williammartin Jul 23, 2024
99ff84b
Alphabetise release json fields
williammartin Jul 23, 2024
c13d161
Export databaseId for releases
williammartin Jul 23, 2024
5df84b5
Merge pull request #9354 from cli/9220-getting-template-not-found-err…
andyfeller Jul 23, 2024
78c3361
Merge pull request #9356 from cli/9278-gh-release-view-with-json-pars…
andyfeller Jul 23, 2024
c16becc
Slightly clarify when CLI will exit with 4
williammartin Jul 23, 2024
adc8b82
Merge pull request #9355 from cli/wm/9241-fulldatabaseid
williammartin Jul 24, 2024
fd51a69
Handle `--bare` clone targets (#9271)
hyperrealist Jul 24, 2024
8da9ee2
Merge pull request #9358 from cli/9338-gh-attestation-can-fail-with-h…
andyfeller Jul 24, 2024
658f125
Update sigstore-go in gh CLI to v0.5.1 (#9366)
steiza Jul 25, 2024
18894b6
Merge branch 'trunk' into fix-8845
andyfeller Jul 26, 2024
30f3a38
Merge pull request #9240 from Stausssi/fix-8845
andyfeller Jul 26, 2024
1fb6df6
build(deps): bump github.com/gabriel-vasile/mimetype from 1.4.4 to 1.4.5
dependabot[bot] Jul 26, 2024
9362143
Merge branch 'trunk' into 9292-add-remove-milestone-option
babakks Jul 28, 2024
6e34e81
Point to `Editable.MilestoneId` method
babakks Jul 28, 2024
4c8ec84
Improve `--remove-milestone` option description
babakks Jul 28, 2024
1520292
Add `--remove-milestone` option
babakks Jul 28, 2024
6dc8cc4
Verify `--body` and `--body-file` are not assignable at the same time
babakks Jul 28, 2024
605b4b1
Assert correct parsing of `--remove-milestone` option
babakks Jul 28, 2024
c9fb4ed
Verify `--milestone` and `--remove-milestone` are not assignable at t…
babakks Jul 28, 2024
d527775
Merge pull request #9372 from cli/dependabot/go_modules/github.com/ga…
andyfeller Jul 29, 2024
fbae0e2
build(deps): bump github.com/google/go-containerregistry
dependabot[bot] Jul 29, 2024
0d87dda
Merge pull request #9373 from cli/dependabot/go_modules/github.com/go…
andyfeller Jul 29, 2024
457274b
Merge branch 'trunk' into 9292-add-remove-milestone-option
babakks Jul 29, 2024
842562d
Use closure-scoped variable to catch `--remove-milestone` option
babakks Jul 29, 2024
a73ae65
Use closure-scoped variable to catch `--remove-milestone` option
babakks Jul 29, 2024
58e6196
Fix missing variable
babakks Jul 29, 2024
b05bddc
Merge pull request #9344 from babakks/9292-add-remove-milestone-option
andyfeller Jul 29, 2024
dc4e9cb
handle attest case insensitivity
ejahnGithub Jul 30, 2024
c1adb1a
added
ejahnGithub Jul 30, 2024
e21e5ef
update test
ejahnGithub Jul 30, 2024
580ddf6
minor fix
ejahnGithub Jul 30, 2024
596ee8b
update test
ejahnGithub Jul 30, 2024
12715fd
Merge branch 'trunk' into eugene/gh-attestation-case-insensitivity
ejahnGithub Jul 30, 2024
1eaf712
update test and remove logic to check SourceRepositoryOwnerURI is emp…
ejahnGithub Jul 31, 2024
87ff22d
Merge branch 'tmp-07-31' into eugene/gh-attestation-case-insensitivity
ejahnGithub Jul 31, 2024
89cbcfe
Merge pull request #9392 from cli/eugene/gh-attestation-case-insensit…
ejahnGithub Jul 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test to verify JSON fields section is rendered
Signed-off-by: Babak K. Shandiz <[email protected]>
  • Loading branch information
babakks committed May 6, 2024
commit 5b99a4a2ece135a97e73f2dc7648932cc862b53f
16 changes: 16 additions & 0 deletions internal/docs/man_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,22 @@ func TestGenManSeeAlso(t *testing.T) {
}
}

func TestGenManJSONFields(t *testing.T) {
buf := new(bytes.Buffer)
header := &GenManHeader{}
if err := renderMan(jsonCmd, header, buf); err != nil {
t.Fatal(err)
}

output := buf.String()

checkStringContains(t, output, translate(jsonCmd.Name()))
checkStringContains(t, output, "JSON FIELDS")
checkStringContains(t, output, "foo")
checkStringContains(t, output, "bar")
checkStringContains(t, output, "baz")
}

func TestManPrintFlagsHidesShortDeprecated(t *testing.T) {
c := &cobra.Command{}
c.Flags().StringP("foo", "f", "default", "Foo flag")
Expand Down