Commit graph

3660 commits

Author SHA1 Message Date
Andy Feller
3ec657d087 Enhance extension upgrade tests for URL 2024-11-07 17:35:59 -05:00
Andy Feller
ddf7287ab8 Test extension command update behaviors
This commit expands upon the previous work by creating tests around extension command execution and how various extension update scenarios are handled.

Along the way, the logic handling formatting update messaging has been switched to use `ColorScheme` in order to honor color behavior flags.
2024-11-06 22:49:02 -05:00
Andrew Feller
47d77bd51b Add version checking when executing extensions
Building on logic from the `gh ext list` for retrieving and assessing extension release information, this commit enhances the logic around invoking extensions to check for new releases.

Using the same user experience from checking `gh` version, this should only output information when the extension is used and gives the user information on how to upgrade depending on the type of extension and whether it is pinned or not.

```shell
andrewfeller@Andrews-MacBook-Pro cli % gh ext install dlvhdr/gh-dash --pin v4.6.0
✓ Installed extension dlvhdr/gh-dash
✓ Pinned extension at v4.6.0
andrewfeller@Andrews-MacBook-Pro cli % ./bin/gh dash

A new release of dash is available: 4.6.0 → 4.7.0
To upgrade, run: gh extension upgrade dash --force
https://github.com/dlvhdr/gh-dash
```
2024-11-02 13:14:05 -04:00
Meredith Lancaster
1652051fc2
Merge pull request #9825 from malancas/verify-provenance-predicate-by-default
`gh attestation verify` should only verify provenance attestations by default
2024-10-30 15:45:18 -06:00
Meredith Lancaster
bb5136007e
Merge pull request #9838 from malancas/attestation-clean-up-tests
Clean up skipped online tests for `gh attestation verify`
2024-10-30 13:28:44 -06:00
Andy Feller
3b4301f62a
Merge pull request #9845 from cli/andyfeller/9807-repo-edit-visibility-confirmation
Require visibility confirmation in `gh repo edit`
2024-10-30 15:20:51 -04:00
Andy Feller
3f5fc85e41 Assert stderr for gh repo edit visibility tests 2024-10-30 13:31:00 -04:00
Meredith Lancaster
384057c2e2 bold all flags in docs
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-29 11:54:42 -06:00
Meredith Lancaster
271450883e
Update pkg/cmd/attestation/verify/verify.go
Co-authored-by: Phill MV <phillmv@github.com>
2024-10-29 11:53:28 -06:00
Andy Feller
15b2db9277 Require visibility confirmation in gh repo edit
This commit modifies interactive and non-interactive behaviors around `gh repo edit` as well as providing greater information about the impact.

1. `--help` usage is expanded to highlight the most significant consequences of changing visibility
1. `--help` usage and interactive experience call out GitHub Docs content that act as source of truth about full consequences of various changes
1. `gh repo edit` interactive experience will require confirmation for any visibility change
1. `gh repo edit` interactive experience will output potential stars and watchers lose regardless of visibility transition
1. `gh repo edit` will require `--visibility` flag to include new `--accept-visibility-change-consequences` flag regardless of interactivity
2024-10-29 10:25:04 -04:00
Meredith Lancaster
15d7e33ddb update references
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-29 07:11:51 -06:00
Meredith Lancaster
7bfddec046 fix references
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-29 07:09:45 -06:00
Meredith Lancaster
efa6fafc47
Update pkg/cmd/attestation/verification/attestation.go
Co-authored-by: Phill MV <phillmv@github.com>
2024-10-29 07:06:23 -06:00
Meredith Lancaster
7598c4a58f organize
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-28 15:38:06 -06:00
Meredith Lancaster
f8f3502cac doc updates
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-28 15:37:58 -06:00
Meredith Lancaster
8a8f224a7a fix test
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-28 15:28:00 -06:00
Meredith Lancaster
4ec696dacd create common test fixture, organize tests
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-28 13:40:48 -06:00
Meredith Lancaster
502856082e table tests
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-28 13:40:23 -06:00
Meredith Lancaster
f8b0f5e687 clean up test
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-28 13:02:12 -06:00
Meredith Lancaster
ce5bde4379 simplify signer workflow validation tests
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-28 12:59:04 -06:00
Meredith Lancaster
a820457b09 clean up skipped online tests
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-28 11:47:31 -06:00
Meredith Lancaster
9ddaf13ef5 add predicate type to integration tests
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-25 15:32:16 -06:00
Meredith Lancaster
cef335c698 update tests to include predicate type
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-25 15:26:32 -06:00
Meredith Lancaster
28fa42a324 message formatting
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-25 15:00:11 -06:00
Meredith Lancaster
fa6536493f predicate-type is no longer empty
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-25 14:54:52 -06:00
Meredith Lancaster
84f326542f Merge branch 'verify-provenance-predicate-by-default' of github.com:malancas/cli into verify-provenance-predicate-by-default 2024-10-25 14:04:59 -06:00
Meredith Lancaster
e8013c0778 update documentation to indclude predicate-type information
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-25 14:04:54 -06:00
Meredith Lancaster
c552224081
Merge branch 'trunk' into verify-provenance-predicate-by-default 2024-10-25 13:58:20 -06:00
Meredith Lancaster
4d57c79770 set provenance predicate type as default for predicate-type flag
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-10-24 11:40:55 -06:00
William Martin
d4c70009bf
Adjust environment help for host and tokens (#9809) 2024-10-24 17:54:27 +02:00
Phill MV
afa4272bdf
Merge pull request #9797 from cli/phillmv/retry-getting-attestations
`gh at verify` retries fetching attestations if it receives a 5xx
2024-10-23 13:45:09 -04:00
bagtoad
04add8d68f Use new GitHub previews terminology in attestation
Update attestations commands to align with new GitHub previews terminology, replacing `beta` with `public preview`.

https://github.blog/changelog/2024-10-18-new-terminology-for-github-previews/
2024-10-22 10:50:00 -06:00
William Martin
ad7c29dc5c
Merge pull request #9790 from tsukasaI/feature/add-archived-timestamp
Add archivedAt json field to repo view and list
2024-10-22 14:03:58 +02:00
William Martin
a923e33421 Test json flags for repo view and list 2024-10-22 13:38:51 +02:00
Kynan Ware
6dab689718
Merge pull request #9794 from cli/kw/cli-9699-validate-local-extension-installs
Prevent local extension installations with invalid names and conflicts with core commands and other extensions
2024-10-21 13:40:09 -06:00
bagtoad
daec7a0e0e Check extOwner for no value instead 2024-10-21 13:28:37 -06:00
bagtoad
35aa8521c4 Fix tests for invalid extension name 2024-10-21 12:47:14 -06:00
bagtoad
cc32f33583 Refactor to remove code duplication 2024-10-21 12:37:27 -06:00
Phill MV
de4c05fb61 Linting: now that mockDataGenerator has an embedded mock, we ought to have pointer receivers in its funcs. 2024-10-21 14:32:32 -04:00
Phill MV
a8b3f050ac
Merge branch 'trunk' into phillmv/fail-verification-if-no-attestations 2024-10-21 12:49:41 -04:00
Phill MV
e7446676b6 Minor tweaks, added backoff to getTrustDomain 2024-10-21 12:44:51 -04:00
Phill MV
fafda48905 added test for verifying we do 3 retries when fetching attestations. 2024-10-21 12:32:57 -04:00
Phill MV
efc1c97cf1 Added constant backoff retry to getAttestations. 2024-10-21 12:10:18 -04:00
Phill MV
664e09fdbc wip: added test that fails in the absence of a backoff. 2024-10-21 11:20:46 -04:00
bagtoad
6923fb5cc8 add validation for local ext install 2024-10-20 16:37:40 -06:00
Tyler McGoffin
1313612245
Merge pull request #9701 from cli/jtmcg/9698
Add handling of empty titles for Issues and PRs
2024-10-17 14:57:57 -07:00
Tyler McGoffin
14acbe00a9 Remove . from test case for TestTitleSurvey 2024-10-17 14:45:35 -07:00
Tyler McGoffin
13ab02729b Clean up Title Survey empty title message code 2024-10-17 14:40:17 -07:00
Andy Feller
86b4bb9956 Include startedAt, completedAt in run steps data
This commit expands the `Step` structure used with GitHub Actions workflow runs to include fields indicating when steps start and complete.

This information is already provided by the GitHub API, so this only involves expanding the structure, fields exported, and the associated tests.

In the future, I could see `gh` including the duration calculation which is used when viewing workflow or workflow run.
2024-10-16 19:38:10 -04:00
Tyler McGoffin
7aef6ec391
Merge pull request #9728 from heaths/issue9704
Supporting filtering on `gist list`
2024-10-15 16:26:13 -07:00