Commit graph

9243 commits

Author SHA1 Message Date
Andy Feller
bdfd51ca7f Fix search tests around totals, initialization
This commit is focused on fixing the `searcher` tests for a few reasons:

1. Correcting the `.Total` logic in the previous commit caused changes to tests to fail
2. Tests involving results that exceed the max per page have been improved with new initialize helper, allowing testing table scenarios to be self contained
3. Tests that stub JSON response payloads have been standardized on maps rather than GitHub type primitives (Repository, Issue, Commit, Code, etc)
4. Tests had some minor formatting changes to make them easier to understand and maintain
2025-04-15 14:43:10 -04:00
Andy Feller
f928cb1e19 Fix remaining search logic totals 2025-04-15 08:36:45 -04:00
Andy Feller
15ff7ba465 Restore result.Total logic, fix formatting
This change restores the original logic of passing the search total count logic as is to the result.

Additionally, this undoes some of the contributor's formatting changes that increase the changed lines to review.
2025-04-15 08:00:47 -04:00
leudz
072534c388 Fix multi pages search for gh search 2025-04-10 07:57:43 +02:00
Kynan Ware
19633d3855
Merge pull request #10516 from iamazeem/8430-show-hostname-in-repo-creation-prompts
[gh repo create] Show host name in repo creation prompts
2025-04-09 14:30:56 -06:00
William Martin
8f33d81083
Merge pull request #10742 from cli/babakks/improve-regexp
Escape dots in regexp pattern in `README.md`
2025-04-09 20:40:03 +02:00
Meredith Lancaster
7b20ee5549
Merge pull request #10749 from malancas/update-to-sigstore-go-v0.7.1
Update github.com/sigstore/sigstore-go to 0.7.1 and fix breaking function change
2025-04-09 11:58:20 +02:00
Andy Feller
47225bcf56
Merge pull request #10737 from cli/andyfeller/muted-text-part2-github-cli-833
Ensure muted text is thematic and customizable
2025-04-08 16:59:36 -04:00
Andy Feller
6dd8f809b1
Merge pull request #10720 from cli/andyfeler/colorize-label-optin
Introduce configuration setting for displaying issue and pull request labels in rich truecolor
2025-04-08 16:44:25 -04:00
Andy Feller
93e51c583b
Update pkg/cmd/run/shared/presentation.go 2025-04-08 16:40:39 -04:00
Andy Feller
644dbe6275
Apply suggestions from code review
Co-authored-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2025-04-08 15:56:23 -04:00
Andy Feller
5c12f5633e Test for explicit config disable of label colors 2025-04-08 15:27:36 -04:00
Andy Feller
c5206109ca Use truthy value for GH_COLOR_LABELS 2025-04-08 15:24:18 -04:00
Kynan Ware
ca00061a53
Merge pull request #10731 from cli/kw/gh-cli-868-pin-actions-to-sha
Pin third party actions to commit sha
2025-04-07 09:28:35 -06:00
Babak K. Shandiz
fc84b7a3cb
Escape dots in regexp pattern in example command
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-07 15:21:48 +01:00
Andy Feller
918cafc222 Deprecate ColorScheme.Gray for ColorScheme.Muted
This commit converts all of the places using ColorScheme.Gray and ColorScheme.Grayf to Muted and Mutedf.

There is a little extra tidying up with local variable names or converting code to use Mutedf format.
2025-04-06 10:18:48 -04:00
Kynan Ware
e21243fe9b ci: pin third party actions to commit sha 2025-04-04 21:45:54 -06:00
Andy Feller
e067eacd81 Refactor ColorScheme initializer
This commit completely removes the iostreams.NewColorScheme() initializer function in favor of exporting the type fields for greater clarity in its use.

The result being code specifying only the fields that matter to test cases.
2025-04-04 11:57:37 -04:00
Andy Feller
addbc6ac5c Add label color env var to help topic, unused fix
This commit adds the new environment variable to the `gh environment` help topic.

Additionally, there is a small fix for Go linter for an unused variable raised as a problem.
2025-04-04 11:02:44 -04:00
Andy Feller
e9a12853cb Merge branch 'trunk' into andyfeler/colorize-label-optin 2025-04-04 09:47:41 -04:00
Andy Feller
5f03c208a1 Fix comment language 2025-04-02 18:32:37 -04:00
Andy Feller
3eca268a7f Introduce color_labels support, update commands
This commit implements the actual changes around configuration setting / environment variable logic for displaying labels using their RGB hex color code in terminals with truecolor support.

One of the subtler changes in this commit is renaming generic ColorScheme.HexToRGB logic to render truecolor to ColorScheme.Label as this feature was being used exclusively for labels.  This is due to confusion about introducing the new `color_labels` config on top of generic coloring logic.
2025-04-02 18:24:20 -04:00
Andy Feller
b52c131d4c
Merge pull request #10709 from cli/andyfeller/table-datetime-contrast-github-cli-832
Ensure table datetime columns have thematic, customizable muted text
2025-04-02 17:20:15 -04:00
William Martin
bab2bc8172
Acceptance test issue/pr create/edit with project (#10707) 2025-04-02 14:50:10 +02:00
Andy Feller
b3c8c70cba Remove deprecated note on gray color functions
Without fixing all ColorScheme.Gray and ColorScheme.Grayf usage in this pull request, golangci-lint throws errors for using deprecated functions.

As that code should be replaced within github/cli#833, I'm removing the deprecation indicator for now to get this PR passing.
2025-03-31 17:00:40 -04:00
Andy Feller
e36d795629 Regenerate mocks 2025-03-31 15:59:18 -04:00
Andy Feller
1bf1ad282b Remove configuration setting vestage 2025-03-31 15:58:37 -04:00
Andy Feller
de86cc6c15 Remove out of scope configuration setting change 2025-03-31 15:57:37 -04:00
Andy Feller
3c38cedaf3 Implement tests for muted logic, standardize reset
This commit covers testing around the new ColorScheme.Muted logic based on various situations to gain confidence we get the accessible colors expected when enabled.

Additionally, this commit includes a small change to the existing 8-bit color logic to standardize on the same reset sequence for testing purposes.  Essentially, `ESC[m` and `ESC[0m` are equivalent but this inconsistency with our other libraries makes setting up tests a little extra confusing and difficult.
2025-03-31 15:33:52 -04:00
Phill MV
0dd9f47159
Merge pull request #10685 from cli/phillmv/document-gh-at-verify-output
Improve `gh at verify --help`, document json output
2025-03-31 15:26:25 -04:00
Andy Feller
d2cd14b4cd Remove out of scope changes, update list commands
After discussing this with the team, the `gh config` changes to display `accessible_colors` have been removed from this branch being outside of acceptance criteria.  This will be moved to a separate issue along with any other work needed to finalize the public preview such as `gh help` entries for `GH_ACCESSIBLE_COLORS` environment variable.

List commands that use ColorScheme.Gray have been updated to use ColorScheme.Muted.
2025-03-31 11:58:30 -04:00
Andy Feller
346fab212b Accessible color config boilerplate, colors update
This commit is focused on incorporating cli/go-gh accessible colors configuration setting into GitHub CLI experience along with new color function to supersede ColorScheme.Gray and ColorScheme.Grayf.

Originally, I was considering having all use of ColorScheme.Gray and ColorScheme.Grayf fallback to the new muted logic if accessible colors were enabled, however I decided not being that it exceeds the acceptance criteria.  This means that every command using ColorScheme.Gray needs to be updated to use ColorScheme.Muted
2025-03-31 11:19:51 -04:00
William Martin
cf9ac4447a Acceptance test issue/pr create/edit with project 2025-03-31 17:06:51 +02:00
Phill MV
0427f26884
Update pkg/cmd/attestation/verify/verify.go
Co-authored-by: Meredith Lancaster <malancas@users.noreply.github.com>
2025-03-31 11:05:23 -04:00
Kynan Ware
e30244686c
Merge pull request #10680 from cli/kw/update-go-gh-and-document-sprig-funcs
Update go-gh and document available sprig funcs
2025-03-28 12:22:14 -06:00
Kynan Ware
aac43870d4 test(release view): fix indentation 2025-03-28 12:11:57 -06:00
Kynan Ware
c6b4da8f20 doc(formatting): add line breaks for readability 2025-03-28 12:00:06 -06:00
Andy Feller
77ae842eb0
Merge pull request #10649 from cli/andyfeller/table-headers-contrast-github-cli-831
Ensure table headers are thematically contrasting
2025-03-28 13:30:49 -04:00
Andy Feller
eabd02793e Renaming tabl eheader variables for maintainability 2025-03-28 13:19:27 -04:00
Kynan Ware
89def92f04 doc(formatting): update sprig func descriptions 2025-03-28 09:58:48 -06:00
Kynan Ware
c1fbc2f05b test(many): fix whitespace in tests expectations
Due to https://github.com/charmbracelet/glamour/pull/334, the margin
used for markdown rendering has changed by a couple spaces. This
corrects the relevant tests to accomodate that change.
2025-03-27 14:21:13 -06:00
Kynan Ware
0750750f7c
Merge pull request #10660 from cli/kw/fix-run-list-with-org-required-workflows
`run list`: do not fail on ruleset imposed workflows
2025-03-27 13:36:29 -06:00
Phill MV
f099a54243 updated test 2025-03-27 09:57:00 -04:00
Phill MV
9c9b158d12 added minor caveat 2025-03-27 09:55:14 -04:00
Phill MV
33ab0b8f3b Tweaked language a bit, improved error message. 2025-03-27 09:47:11 -04:00
Phill MV
321e5687a6 Rewrote the gh at verify --help text to a) clarify and b) document the verificationResult object. 2025-03-26 17:40:35 -04:00
Kynan Ware
229216e830 doc(run shared): clarify 404 handling 2025-03-26 15:29:20 -06:00
Kynan Ware
49588555c3
Merge branch 'trunk' into kw/update-go-gh-and-document-sprig-funcs 2025-03-26 12:38:10 -06:00
Andy Feller
ce4f5c5970
Merge pull request #10683 from cli/andyfeller/10590-alias-delete-test-safeguard
Implement safeguard for `gh alias delete` test, prevent wiping out GitHub CLI configuration
2025-03-26 14:08:48 -04:00
Andy Feller
86ad62a62d Fixes #10590
Implement missing safeguard causing `gh alias delete` tests to wipe out tester's GitHub CLI configuration.
2025-03-26 13:42:39 -04:00