Commit graph

8393 commits

Author SHA1 Message Date
nilvng
4bc90101cd issue #2329: fix prompt header getting duplicated
following the approach in gh run view seems to fix this issue
2024-12-09 21:20:07 +11:00
nilvng
409e3ca08c issue #2329: simplify the UI of the prompt
This commit reverts the previous color changes in the prompt UI. While color highlighting could potentially improve the visual appealing of the prompt
using the existing color library (mguz/ansi) with the prompt library (AlecAivazis/survey) caused unintended side effects.
It reset the bold text style for the selected option. We decide to that
bold text style would have a higher priority than the color text ,for
three reasons:
1. To maintain consistency with other prompts in the UI and prioritize accessibility
2. While color can enhance the user experience, according to Primer Design Guidelines, color should not be relied upon to convey essential information.
3. visual indicator of the selected option, especially crucial when dealing with long PR titles or branch names.

As a future improvement, we may consider a separate issue or PR to address the color library issue and explore controlled color usage in prompts. This could potentially allow for more nuanced visual differentiation while avoiding unintended style resets.

Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-06 19:59:46 +11:00
nilvng
eced54c904 issue #2329: update the prompt's format
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-06 18:49:43 +11:00
nilvng
12479e3072 issue #2329: fix unit tests 2024-12-06 18:19:07 +11:00
Kynan Ware
490bfdac03 issue cli#2329: Fix linter 2024-12-04 14:41:30 -07:00
Kynan Ware
1d19878bc4
Merge branch 'trunk' into nil/fix-2329 2024-12-04 14:37:57 -07:00
nilvng
2a1f27ee01 issue cli#2329: fix unsufficent properties required for PR checkout
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-05 01:07:31 +11:00
Andy Feller
179f0c479e
Merge pull request #10006 from cli/10005-fix-flaky-run-download-test
Use consistent slice ordering in run download tests
2024-12-04 08:13:20 -05: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
nilvng
9c82156e86 issue #2329: move Interactive check to RunE
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-03 22:28:02 +11:00
nilvng
985118e36a fix: update the copy 2024-12-03 20:13:38 +11:00
William Martin
694e565384 Fix PR checkout panic when base repo is not in remotes 2024-12-02 17:20:57 +01:00
Andy Feller
5a74934d19
Merge pull request #9983 from timrogers/timrogers/fork-rename
When renaming an existing remote as part of remote creation in `gh repo fork`, log the change
2024-12-02 10:30:03 -05:00
Kynan Ware
67df4a39fe
Merge pull request #9976 from cli/kw/Improve-DNF-version-clarity-in-install-steps
Clarify which commands correspond to which DNF version under Linux install instructions
2024-12-02 06:08:47 -07:00
William Martin
8d8ac515d0
Merge pull request #9942 from cli/dependabot/go_modules/github.com/gabriel-vasile/mimetype-1.4.7
Bump github.com/gabriel-vasile/mimetype from 1.4.6 to 1.4.7
2024-12-02 14:03:25 +01:00
nilvng
d92e529629 issue #2329: return error when not running interactively 2024-12-01 22:37:53 +11: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
nilvng
e4dced01f7 issue #2329: fix missing stub 2024-11-30 23:51:00 +11:00
Kynan Ware
4f4602a682 Improve DNF version clarity in install steps 2024-11-29 16:34:41 -07:00
Kynan Ware
9c550992ea
Merge branch 'trunk' into nil/fix-2329 2024-11-28 10:10:45 -07:00
Andy Feller
9983939d53
Merge pull request #9969 from cli/kw/fix-formatting-for-linter-git-client_test.go
Fix formatting in `git/client_test.go` comments for linter
2024-11-27 16:32:02 -05:00
bagtoad
76f1553fb9 Fix formatting in client_test.go comments for linter 2024-11-27 14:19:27 -07:00
Andy Feller
1fe14c956d
Merge commit from fork
Use only one pattern for credential helper matching
2024-11-27 15:57:08 -05:00
Andy Feller
c94def8b51 Bump cli/go-gh for codespace fix 2024-11-27 15:54:38 -05:00
William Martin
ec086a021b
Update git/client_test.go
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-11-27 15:51:44 +01:00
William Martin
622e283d2b
Update git/client_test.go
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-11-27 15:51:38 +01:00
William Martin
21a14a7d1a
Update git/client_test.go
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-11-27 15:50:54 +01: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
0b4f087b46 Fix CredentialPattern doc typos
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-11-27 12:07:04 +01:00
William Martin
3773068f58 Remove TODOs 2024-11-27 12:06:17 +01:00
Tyler McGoffin
ad397bd0a6 Fix typos and add tests for CredentialPatternFrom* functions 2024-11-26 16:08:51 -08:00
William Martin
0db05ff022 Add SSH remote todo 2024-11-26 22:30:19 +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
5f5c5270c9 Allow opt-in to insecure pattern 2024-11-26 22:29:43 +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
bagtoad
11dc6df88b ScopesResponder wraps StatusScopesResponder 2024-11-23 13:19:45 -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
Phill MV
f84c1c6f51
Merge pull request #9937 from malancas/verify-result-processing
Update verification results printing
2024-11-22 10:54:34 -05:00