Commit graph

3791 commits

Author SHA1 Message Date
Mateus Marquezini
a3cf4e1c2d
Merge branch 'trunk' into fix/issue_10042 2024-12-09 08:42:57 -03:00
Mateus Marquezini
cbaaf77822 fixing gh gist view prompts with no TTY 2024-12-09 08:35:01 -03:00
ANKDDEV
a4923de755
docs: update description of command
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-06 20:43:54 +03:00
ANKDDEV
0653a5a09c
style: reformat files 2024-12-06 20:04:15 +03:00
ANKDDEV
0e5f26449d
docs: update sentence case
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-06 19:38:26 +03:00
ANKDDEV
694e209142
docs: improve help for browse command
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-12-06 16:33:57 +03:00
ANKDDEV
3e647385f7
docs: improve docs for browse command as of #5352 2024-12-06 13:45:22 +03:00
Andy Feller
d60e5ffba3
Merge pull request #10016 from cli/andyfeller/cli-cli-10013-pr-checks-json-watch-mutex
Error for mutually exclusive json and watch flags
2024-12-05 12:22:24 -05:00
Andy Feller
acfdae466e
Merge pull request #10009 from cli/wm/safepaths
Use safepaths for run download
2024-12-05 11:43:10 -05:00
Meredith Lancaster
2137a483de include alg with digest when fetching bundles from OCI
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-05 09:27:14 -07:00
Andy Feller
c9ecf310b3 Error for mutually exclusive json and watch flags
Closes #10013

This commit enhances `gh pr checks` to exit with an error when mutually exclusive `--json` and `--watch` flags are used.  Users are encouraged to either 1) retrieve information about the checks via `--json` or 2) watch and wait on PR checks that are being updated.
2024-12-05 10:23:13 -05:00
William Martin
9bd8f09774 Use safepaths for run download 2024-12-04 22:12:58 +01:00
William Martin
a47b4c9f1d Use consistent slice ordering in run download tests 2024-12-04 13:02:25 +01:00
Tyler McGoffin
1136764c36
Merge commit from fork
The fix
2024-12-03 15:12:05 -08:00
Andy Feller
8720479b0b Consolidate logic for isolating artifacts 2024-12-03 13:33:00 -05:00
William Martin
7c241cf4e6
Merge pull request #9992 from cli/wm/fix-pr-checkout-panic
Fix PR checkout panic when base repo is not in remotes
2024-12-03 14:04:32 +01:00
William Martin
694e565384 Fix PR checkout panic when base repo is not in remotes 2024-12-02 17:20:57 +01:00
Tim Rogers
c719d920c3
When renaming an existing remote in gh repo fork, log the change
When running `gh repo fork` in the context of an existing repo, the CLI offers to create a remote for the fork:

```
? Would you like to add a remote for the fork? Yes
```

If you accept, it prints a log stating that the `origin` remote has been created:

```
✓ Added remote origin
```

Where there is an existing `origin` remote, this is renamed to `upstream`, but this is done silently without any notification to the user.

```bash
$ git remote -v
origin	https://github.com/timrogers/badger.github.io.git (fetch)
origin	https://github.com/timrogers/badger.github.io.git (push)
upstream	https://github.com/badger/badger.github.io.git (fetch)
upstream	https://github.com/badger/badger.github.io.git (push)
```

It seems kinda fine to rename the remote without explicitly confirming since this is not a truly destructive action, but it should make it clear what it is doing.

This updates the logging to explicitly log about the renaming of
the existing remote:

```
✓ Renamed remote origin to upstream
```

Fixes #9982.
2024-11-30 21:19:55 +00:00
Andy Feller
1fe14c956d
Merge commit from fork
Use only one pattern for credential helper matching
2024-11-27 15:57:08 -05:00
William Martin
bd44d33eaa Add checkout test that uses ssh git remote url 2024-11-27 13:06:35 +01:00
William Martin
72a6fd00a4 Rename backwards compatible credentials pattern 2024-11-27 12:21:55 +01:00
William Martin
efd8ff6d46 General cleanup and docs 2024-11-26 22:30:11 +01:00
William Martin
19d62826d6 Allow repo sync fetch to use insecure credentials pattern 2024-11-26 22:30:07 +01:00
William Martin
6b7f1ff060 Allow client fetch to use insecure credentials pattern 2024-11-26 22:30:03 +01:00
William Martin
7affcadb5e Allow client push to use insecure credential pattern 2024-11-26 22:29:58 +01:00
William Martin
75712de712 Allow client pull to use insecure credential pattern 2024-11-26 22:29:51 +01:00
William Martin
46922694dc Support secure credential pattern 2024-11-26 22:29:38 +01:00
Andy Feller
b133f9cce0
Merge pull request #9791 from cli/kw/cli-9773-informative-message-for-workflow-scope
Print friendly error when `release create` fails due to missing `workflow` OAuth scope
2024-11-26 08:30:59 -05:00
bagtoad
deb34d6456 Refactor error handling for missing "workflow" scope in createRelease 2024-11-23 16:59:49 -07:00
Kynan Ware
a4f96d29e3 Refactor workflow scope checking
Refactor the logic for checking `workflow` scope checking in releases to be in the positive - check if the scope is there, not check if it isn't there. Then, when the function is called we invert it.

Also update comments to be more imperative.

This refactor also incorporates @andyfeller's suggestion to use `slices`.

Co-Authored-By: Andy Feller <andyfeller@github.com>
2024-11-23 13:17:09 -07:00
Andy Feller
cdfc12caf5 Expand logic and tests to handle edge cases
This commit expands filepathDescendsFrom(string, string) to handle edge cases such as mixing absolute and relative paths or artifact name edge cases.

Additionally, tests for filepathDescendsFrom() and downloadrun() have been expanded to verify additional use cases.
2024-11-22 15:26:11 -05:00
Kynan Ware
ae87caf8d6
Merge pull request #9948 from cli/kw/use-heredoc-for-several-command-docs
Fix some multiline command documentation to use `heredoc` strings
2024-11-22 10:11:32 -07:00
Meredith Lancaster
f92d703554 pr feedback
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-21 15:40:15 -07:00
Meredith Lancaster
0fd09eb5ff pr feedback
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-21 15:30:41 -07:00
Meredith Lancaster
fed3c8142c
Update pkg/cmd/attestation/verify/attestation_integration_test.go
Co-authored-by: Phill MV <phillmv@github.com>
2024-11-21 15:20:44 -07:00
Andy Feller
e7c5706336 Refactor download testing, simpler file descends
This incorporates the work done by @williammartin to improve reasoning about `gh run download` behavior through testing while verifying a simpler solution to checking if a path is contained within a directory.
2024-11-21 17:07:27 -05:00
Kynan Ware
74f13a9b4f
Apply suggestions from code review
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-11-21 13:55:35 -07:00
bagtoad
677ed2cdcf Refactor command documentation to use heredoc 2024-11-21 13:23:03 -07:00
Meredith Lancaster
27a268cf17
Merge branch 'trunk' into verify-result-processing 2024-11-21 10:07:03 -07:00
Meredith Lancaster
2d41225dd5 pr feedback
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-21 09:11:18 -07:00
Meredith Lancaster
28565dc1f8 remove unused test file
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-21 08:58:55 -07:00
Meredith Lancaster
7a271b008a undo change
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-21 08:58:23 -07:00
Meredith Lancaster
4d277df559 add more testing testing fixtures
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-21 08:43:21 -07:00
Meredith Lancaster
19afe453c7 update test with new test bundle
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-20 14:53:02 -07:00
Meredith Lancaster
5601149c83 naming
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-20 13:34:40 -07:00
Meredith Lancaster
ff8844a308 update test
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-20 13:22:55 -07:00
Meredith Lancaster
4671b8d66b update test
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-20 12:46:06 -07:00
Tyler McGoffin
83cf411556 Improve test names so there is no repetition 2024-11-19 16:08:31 -08:00
Meredith Lancaster
3e6861e7e1 clean up
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-19 16:28:36 -07:00
Meredith Lancaster
b5788f2523 wrap sigstore and cert ext verification into a single function
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-11-19 16:24:17 -07:00