Commit graph

11052 commits

Author SHA1 Message Date
Babak K. Shandiz
1f94ee4c58
docs: add manual PGP key verification commands
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-04-08 13:07:33 +01:00
Babak K. Shandiz
2eceb3908c
docs: polish wording around PGP keys
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-04-07 22:21:26 +01:00
Babak K. Shandiz
5f38ef1a02
docs: include PGP key fingerprints
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-04-07 22:13:06 +01:00
Babak K. Shandiz
d0558fcbaa
Merge pull request #13097 from Bahtya/fix-limit-final
Fix infinite loop in `gh release list --limit 0`
2026-04-04 11:30:21 +01:00
bahtya
57b2477752 Fix infinite loop in 'gh release list --limit 0'
Other list subcommands correctly reject --limit 0 but 'release list'
does not validate the limit, causing an infinite loop.

Add validation consistent with other subcommands and a test.

Closes #13078
2026-04-04 18:13:25 +08:00
William Martin
5d3c2ba569
Merge pull request #13071 from cli/dependabot/go_modules/github.com/klauspost/compress-1.18.5
chore(deps): bump github.com/klauspost/compress from 1.18.4 to 1.18.5
2026-03-31 17:22:09 +02:00
dependabot[bot]
4d22541239
chore(deps): bump github.com/klauspost/compress from 1.18.4 to 1.18.5
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.18.4 to 1.18.5.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Commits](https://github.com/klauspost/compress/compare/v1.18.4...v1.18.5)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.18.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-31 14:03:34 +00:00
William Martin
40da05861a
Merge pull request #13048 from thaJeztah/snappier
replace github.com/golang/snappy with klauspost/compress/snappy
2026-03-31 12:25:44 +02:00
Babak K. Shandiz
68c6d9e127
Merge pull request #13046 from cli/wm/gh-api-agent
Ensure `api` and `auth` commands record agentic invocations
2026-03-27 17:24:59 +00:00
Babak K. Shandiz
2bf528ccc7
test(internal/authflow): assert user-agent header is not modified/added
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2026-03-27 11:48:17 +00:00
Sebastiaan van Stijn
6868d273ec
replace github.com/golang/snappy with klauspost/compress/snappy
The github.com/golang/snappy repository was archived and is no longer
maintained. klauspost/compress provides a drop-in replacement, which
is actively maintained, and the klauspost/compress module is already
an existing (indirect) dependency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-03-26 22:58:08 +01:00
William Martin
4e8aa562a3 docs: require tests and linter pass before committing
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 17:26:27 +01:00
William Martin
fb8e22a767 fix(auth): preserve User-Agent in authflow getViewer
getViewer was building a new HTTP client from scratch, losing
AppVersion and InvokingAgent from the plain client already passed
into AuthFlow. Reuse the existing client by shallow-copying it and
wrapping its transport with AddAuthTokenHeader for the new token.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 17:26:27 +01:00
William Martin
268453803e fix(api): propagate InvokingAgent in gh api HTTP client
The gh api command builds its own HTTP client inline without
forwarding InvokingAgent, so the User-Agent header was missing
the Agent/<name> suffix when invoked by AI coding agents.

Thread InvokingAgent through Factory → ApiOptions → HTTPClientOptions,
mirroring the existing AppVersion pattern.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 16:55:16 +01:00
William Martin
b62671151b
Merge pull request #12859 from cli/kw/experimental-huh-prompter
Add experimental huh-only prompter gated by GH_EXPERIMENTAL_PROMPTER
2026-03-26 14:38:19 +01:00
William Martin
cb2b50576f Ensure huh prompter cleans up 2026-03-26 14:26:57 +01:00
Kynan Ware
84a3ba83e4 fix(huh prompter): remove unused fields and imports
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:26:57 +01:00
Kynan Ware
f92fab6124 go mod tidy 2026-03-26 14:26:56 +01:00
Kynan Ware
13e47d0078 feat(huh prompter): clear search input after submitting query
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:26:17 +01:00
Kynan Ware
cfb2224176 refactor(huh prompter): custom Field for MultiSelectWithSearch
Replace the OptionsFunc-based MultiSelectWithSearch with a custom huh
Field implementation. huh's OptionsFunc runs in a goroutine, causing
data races with selection state and stale cache issues that made
selections disappear on toggle or search changes.

The custom field (multiSelectSearchField) combines a text input and
multi-select list in a single field with full control over the update
loop. Search runs asynchronously via tea.Cmd when the user presses
Enter, with a themed spinner during loading. Selections are stored in
a simple map — no goroutine races, no Eval cache, no syncAccessor.

Also adds defensive validation for mismatched Keys/Labels slices from
searchFunc.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:26:17 +01:00
Kynan Ware
f38abbe1ca feat(huh prompter): add placeholder to search input
Add 'Type to search, Ctrl+U to clear' placeholder to the
MultiSelectWithSearch search input. Set WithWidth(80) in the test
harness to prevent textinput placeholder rendering panics when
there is no terminal.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:26:17 +01:00
Kynan Ware
38e10d5ebf fix(huh prompter): use synchronized accessors to eliminate data race
Replace Value() pointer bindings with syncAccessor in
MultiSelectWithSearch. huh's OptionsFunc runs in a goroutine while
the main event loop writes field values, causing a data race on
shared variables. syncAccessor implements huh's Accessor interface
with a shared mutex, ensuring all reads and writes are synchronized.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:26:17 +01:00
Kynan Ware
95a59f4431 fix(accessible prompter): update test expectations for huh v2
Fix accessible prompter tests that broke with the huh v2 upgrade:
- Replace 'Input a number' with 'Enter a number' (huh v2 changed text)
- Remove trailing CRLF from ExpectString calls that now fail due to
  ANSI color codes wrapping the title text
- Allow ANSI escape codes in password masking regex assertions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:26:16 +01:00
Kynan Ware
4d74e057f2 refactor(huh prompter): pipe-based test harness with full coverage
Replace manual model updates with an io.Pipe-based test harness that
drives forms through bubbletea's real event loop. Interaction helpers
(tab(), toggle(), typeKeys(), enter(), etc.) send raw terminal bytes
through io.Pipe to form.Run() in a goroutine.

Add tests for AuthToken, ConfirmDeletion, and InputHostname including
validation rejection paths. Add MultiSelectWithSearch coverage for
persistent options and empty search results.

30 tests, ~1s, all build*Form methods at 94-100% coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:26:16 +01:00
Kynan Ware
86d876fd34 test(huh prompter): add table-driven tests for all prompt types
Extract build*Form() methods from each huhPrompter method, separating
form construction from form.Run(). This enables testing the real form
construction code by driving it with direct model updates, adapted
from huh's own test patterns.

Tests cover Input, Select, MultiSelect, Confirm, Password,
MarkdownEditor, and MultiSelectWithSearch including a persistence
test that verifies selections survive across search query changes.

Also fixes a search cache initialization bug where the first
buildOptions("") call would skip the searchFunc due to
cachedSearchQuery defaulting to "".

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:26:16 +01:00
Kynan Ware
f294831e7d Upgrade to huh/v2 and fix selection persistence in MultiSelectWithSearch
Migrate from github.com/charmbracelet/huh v1 to charm.land/huh/v2,
updating ThemeBase16 to the new ThemeFunc API.

Fix selected options being lost across searches in the huhPrompter's
MultiSelectWithSearch. The root cause was huh's internal Eval cache:
when the user returned to a previously-seen search query, cached
options with stale .selected state overwrote the current selections
via updateValue(). The fix includes selectedValues in the OptionsFunc
binding hash (via searchOptionsBinding) so the cache key changes
whenever selections change, preventing stale cache hits. A local
searchFunc result cache avoids redundant API calls when only the
selection state (not the query) has changed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:26:15 +01:00
Kynan Ware
4661c05ed0 Fix gofmt alignment for prompter-enabled fields in IOStreams
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:24:56 +01:00
Kynan Ware
726714d1a7 Use LayoutStack for huhPrompter MultiSelectWithSearch
Implement a huh-native MultiSelectWithSearch that renders the search
input and multi-select list simultaneously using LayoutStack. The
search input is in Group 0 and the multi-select in Group 1, with
OptionsFunc bound to the search query so results update when the
user presses Enter to advance focus. Users can Shift+Tab back to
refine their search, and selections persist across queries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:24:56 +01:00
Kynan Ware
87426ee236 Add experimental huh-only prompter gated by GH_EXPERIMENTAL_PROMPTER
Introduce a new Prompter implementation (huhPrompter) that uses the
charmbracelet/huh library in its standard interactive mode, as an
alternative to the survey-based default prompter. The new implementation
is gated behind the GH_EXPERIMENTAL_PROMPTER environment variable,
following the same truthy/falsey pattern as GH_ACCESSIBLE_PROMPTER.

Key differences from the accessible prompter:
- No WithAccessible(true) flag (full interactive TUI)
- Uses EchoModePassword (masked with *) instead of EchoModeNone
- No default value annotations appended to prompt text

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 14:24:56 +01:00
William Martin
afe0adf7ed
Merge pull request #12951 from cli/dependabot/github_actions/azure/login-3.0.0
chore(deps): bump azure/login from 2.3.0 to 3.0.0
2026-03-26 14:09:45 +01:00
William Martin
c61b1600c2
Merge pull request #13004 from cli/dependabot/github_actions/mislav/bump-homebrew-formula-action-4.1
chore(deps): bump mislav/bump-homebrew-formula-action from 3.6 to 4.1
2026-03-26 14:09:33 +01:00
William Martin
3460080d27
Merge pull request #13005 from cli/dependabot/github_actions/microsoft/setup-msbuild-3.0.0
chore(deps): bump microsoft/setup-msbuild from 2.0.0 to 3.0.0
2026-03-26 14:09:19 +01:00
William Martin
39407e65e3
Merge pull request #13037 from cli/kw/acceptance-test-git-config
Fix acceptance test failures: git identity, headRepository JSON, obsolete traversal test
2026-03-26 13:32:29 +01:00
William Martin
971be976b3 Add nameWithOwner to necessary tests 2026-03-26 13:23:43 +01:00
Kynan Ware
5ed8cf0faa fix(pr view): fetch nameWithOwner in headRepository GraphQL query
Commit dd424d85f added NameWithOwner to PRRepository for agent-task
listings but didn't update the headRepository GraphQL query to fetch it.
This caused gh pr view --json headRepository to emit an empty
"nameWithOwner":"" field, breaking the pr-create-respects-simple-
pushdefault acceptance test.

Fetch nameWithOwner in the query and update the test assertion to expect
it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 12:47:45 -06:00
Kynan Ware
be4960a255 test(acceptance): remove run-download-traversal test
GitHub's Artifact API now rejects artifact names like '..' server-side
with a 400 Bad Request, making it impossible to create artifacts with
path traversal names. This means the scenario this test was verifying
(that gh run download catches traversal names) can no longer be
reproduced through normal artifact creation.

The client-side traversal check in gh run download remains in place as a
defense-in-depth measure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 12:47:45 -06:00
Kynan Ware
6666850871 fix(acceptance): set git identity in testscript sandbox
The sandbox overrides HOME so git cannot find the user's global config,
causing 'Author identity unknown' errors when acceptance test scripts
make commits. Write a minimal .gitconfig with user.name and user.email
into the sandbox working directory during sharedSetup.

Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 12:47:44 -06:00
Kynan Ware
a32d004d9d
Merge pull request #13030 from cli/cleanup-outdated-triage-doc
Align triage.md with current triage process
2026-03-25 11:59:27 -06:00
Kynan Ware
8f7d20855e
Merge pull request #13025 from cli/kw/refactor/reviewer-assignee-actor-symmetry
Consolidate actor-mode signals into ApiActorsSupported
2026-03-25 11:43:18 -06:00
William Martin
9b4a989d35
Merge pull request #13033 from Lslightly/13001-fix-err-data-race-and-heap-alloc
define err in go func instead of use err defined in outer scope
2026-03-25 18:13:38 +01:00
Qingwei Li
e53e360d5b
internal/codespaces/portforwarder: define err in go func instead of use err defined in outer scope
Fixes #13001
2026-03-26 00:31:56 +08:00
William Martin
d81c9bbdd3
Merge pull request #13031 from cli/dependabot/go_modules/github.com/zalando/go-keyring-0.2.8
chore(deps): bump github.com/zalando/go-keyring from 0.2.6 to 0.2.8
2026-03-25 15:55:00 +01:00
dependabot[bot]
c3fe99fc2a
chore(deps): bump github.com/zalando/go-keyring from 0.2.6 to 0.2.8
Bumps [github.com/zalando/go-keyring](https://github.com/zalando/go-keyring) from 0.2.6 to 0.2.8.
- [Release notes](https://github.com/zalando/go-keyring/releases)
- [Commits](https://github.com/zalando/go-keyring/compare/v0.2.6...v0.2.8)

---
updated-dependencies:
- dependency-name: github.com/zalando/go-keyring
  dependency-version: 0.2.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-25 14:40:34 +00:00
William Martin
69d89a6590
Merge pull request #12884 from cli/babakks/use-min-discovery-fields-for-issue-create
fix(issue): avoid fetching unnecessary fields for discovery
2026-03-25 15:39:40 +01:00
William Martin
7ef7d7fb69
Merge pull request #12962 from cli/dependabot/go_modules/github.com/google/go-containerregistry-0.21.3
chore(deps): bump github.com/google/go-containerregistry from 0.20.7 to 0.21.3
2026-03-25 15:38:07 +01:00
William Martin
52850321b4
Merge pull request #12725 from realMelTuc/fix-readme-typo
Fix typo: remove extra space in README.md link
2026-03-25 15:25:11 +01:00
tidy-dev
5477387fa5
Update docs/triage.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-25 06:57:10 -07:00
tidy-dev
e6680adaaa
Update docs/triage.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-25 06:56:19 -07:00
tidy-dev
c82177c702 Align triage.md with unified triage process 2026-03-25 09:45:59 -04:00
MelTuc
bbbfe9b8ca Fix typo: remove extra space in README.md link 2026-03-25 14:31:31 +01:00