Commit graph

11279 commits

Author SHA1 Message Date
Kynan Ware
7382b86c1a Fetch org teams via repository.owner inline fragment
Replace the top-level organization(login: $owner) query with
repository.owner { ... on Organization { teams } }. This uses
GraphQL inline fragments to conditionally fetch team data only
when the repo owner is an Organization, eliminating the need to
handle 'Could not resolve to an Organization' errors for
personal repos.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 09:47:47 -07:00
dependabot[bot]
c39a51e73b
chore(deps): bump google.golang.org/grpc from 1.79.1 to 1.79.2
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.1 to 1.79.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.79.1...v1.79.2)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.79.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-06 14:03:21 +00:00
Kynan Ware
24fb7657cd Exclude PR author from reviewer candidates in SuggestedReviewerActors
Add author { login } to the SuggestedReviewerActors GraphQL query
and pre-seed the seen map with the author login so they are excluded
from all sources (suggestions, collaborators, teams). Previously the
author was only skipped via the isAuthor flag in the suggestions loop
but could still appear as a collaborator.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 15:53:50 -07:00
Kynan Ware
1bba50b3e0 Fix duplicate reviewers in gh pr edit by passing logins as defaults
Use DefaultLogins instead of Default display names when calling
MultiSelectWithSearch for reviewers. The dedup logic in the
prompter compares keys (logins) against defaults, so passing
display names like 'mxie (Melissa Xie)' prevented deduplication
against search result keys like 'mxie'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 15:44:25 -07:00
Kynan Ware
90bfa624c2 Exclude current user from suggested reviewers in gh pr create
Query the viewer login in SuggestedReviewerActorsForRepo and
pre-seed the seen map so the current user is filtered out of
collaborator results. You cannot review your own PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 15:36:48 -07:00
Kynan Ware
08c7a4c207 Replace @copilot with Copilot reviewer login in gh pr create
Wire CopilotReviewerReplacer into NewIssueState so that
`gh pr create --reviewer @copilot` correctly resolves to the
copilot-pull-request-reviewer bot login, matching the behavior
already implemented in gh pr edit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 15:15:33 -07:00
Kynan Ware
49f1bd8800 Add TODO requestReviewsByLoginCleanup on GHES ID-based reviewer path
Mark the GHES ID-resolution branch in AddMetadataToIssueParams
for cleanup once GHES supports requestReviewsByLogin.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 10:58:23 -07:00
Kynan Ware
07138b6edf Remove /slug team reviewer shorthand normalization
Team reviewers must be provided as fully qualified org/teamname.
Remove the /slug shorthand that auto-prefixed the repo owner,
as this format is not supported.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 10:58:08 -07:00
Kynan Ware
37776cf2e6 Add TODO requestReviewsByLoginCleanup on static reviewer MultiSelect
Mark the legacy static MultiSelect reviewer path for cleanup once
GHES supports requestReviewsByLogin and search-based selection can
be used universally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 10:57:45 -07:00
Kynan Ware
dd7e44ee0a Check state.ActorReviewers in MetadataSurvey reviewer search gate
Gate search-based reviewer selection on both state.ActorReviewers
and the search function being available, consistent with the
ActorAssignees pattern used for assignees.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 10:57:28 -07:00
Kynan Ware
8f62e8116d Label Copilot detection in SuggestedReviewerActorsForRepo as a hack
Mark the piggyback-on-open-PR technique for detecting Copilot
reviewer availability as a HACK, since there is no repo-level API
to check Copilot eligibility without a PR context.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 10:56:47 -07:00
Kynan Ware
6341588f90 Add TODO requestReviewsByLoginCleanup in CreatePullRequest
Add a cleanup TODO comment above the GHES feature detection branch
in CreatePullRequest so we can track removing the ID-based reviewer
request path once GHES supports requestReviewsByLogin.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 10:56:31 -07:00
Kynan Ware
c0cd4c13d0
Merge pull request #12845 from yuvrajangadsingh/refactor/deduplicate-scope-error-handling
refactor: deduplicate scope error handling between api/client.go and project queries
2026-03-05 10:31:25 -07:00
yuvrajangadsingh
fdd6388086 refactor: deduplicate scope error handling between api/client.go and project queries
Consolidate duplicated INSUFFICIENT_SCOPES error handling into a single
implementation. The project queries package now calls
api.GenerateScopeErrorForGQL instead of reimplementing the same logic.

Removes duplicated requiredScopesFromServerMessage, scopesRE, and the
associated test (already covered by api/client_test.go).

Fixes #12823
2026-03-05 20:57:32 +05:30
William Martin
19d70d1c6b
Merge pull request #12842 from cli/dependabot/go_modules/github.com/docker/cli-29.2.0incompatible
chore(deps): bump github.com/docker/cli from 29.0.3+incompatible to 29.2.0+incompatible
2026-03-05 12:58:54 +01:00
William Martin
e17d203569
Merge pull request #12838 from cli/remove-state-reason-duplicate-detection
Remove unnecessary StateReason and StateReasonDuplicate feature detection
2026-03-05 12:52:00 +01:00
Copilot
ff8873da07
Fix extension install error message showing raw struct instead of owner/repo (#12836)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: williammartin <1611510+williammartin@users.noreply.github.com>
2026-03-05 12:28:54 +01:00
dependabot[bot]
80faf6f24c
chore(deps): bump github.com/docker/cli
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 29.0.3+incompatible to 29.2.0+incompatible.
- [Commits](https://github.com/docker/cli/compare/v29.0.3...v29.2.0)

---
updated-dependencies:
- dependency-name: github.com/docker/cli
  dependency-version: 29.2.0+incompatible
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 03:22:41 +00:00
Kynan Ware
4f2304d4e5 Remove StateReason feature detection for issue close
The stateReason field was added in GHES ~3.4, which is far older than
the earliest supported GHES version (3.14). The feature detection and
conditional inclusion of stateReason is therefore unnecessary.

This removes:
- StateReason field from IssueFeatures struct
- GHES introspection query in IssueFeatures() (only ActorIsAssignable
  remains, which is always false on GHES)
- Conditional stateReason field inclusion in issue list
- Feature detection guard in issue close
- Feature detection guard in FindIssueOrPR

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 13:31:30 -07:00
Kynan Ware
6b56a23970 Remove unnecessary StateReasonDuplicate feature detection
The DUPLICATE enum variant for IssueClosedStateReason was added in
GHES 3.16, which is older than the earliest supported GHES version.
The feature detection check is therefore unnecessary.

Addresses: https://github.com/cli/cli/pull/12811#issuecomment-3997044372

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 13:24:05 -07:00
Kynan Ware
d594c5e918
docs: add examples to gh issue close help text (#12830)
Add examples for closing issues, closing with a comment, closing as
duplicate, and closing with a reason.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2026-03-04 14:53:27 +00:00
Kynan Ware
38c997567a
Fix incorrect integer conversion from int to uint16 in port forwarder (#12831)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-04 13:01:52 +01:00
Kynan Ware
3fec2e5f7b
Merge pull request #12811 from tksohishi/issue-close-duplicate-of
Add `--duplicate-of` flag and duplicate reason to issue close
2026-03-03 20:42:05 -07:00
Kynan Ware
d46ca24a97
Merge pull request #11714 from scarf005/build/customize-prefix
build: customizable install `prefix`
2026-03-03 20:17:36 -07:00
Kynan Ware
85ae53e702
Merge branch 'trunk' into build/customize-prefix 2026-03-03 20:08:56 -07:00
Takeshi
b9c8d8e023
Merge branch 'trunk' into issue-close-duplicate-of 2026-03-03 22:03:25 -05:00
Takeshi
2265820853 Combine issue feature detection into a single GraphQL query
Merge the Issue_fields and IssueClosedStateReason_enumValues
introspection queries into one call to avoid an extra API round-trip
on GHES.
2026-03-03 21:51:18 -05:00
Kynan Ware
d6d0cb741c
Merge pull request #11486 from masonmcelvain/browse-blame
feat(browse): add blame flag
2026-03-03 19:17:35 -07:00
Mason McElvain
74ff94c3e4 feat(browse): add blame flag 2026-03-03 19:03:40 -07:00
Kynan Ware
4ea9076d81
Merge pull request #12651 from gunadhya/fix-repeating-cmd-gh-issue-develop
`issue develop`: prevent .git/config corruption on repeated `--name` invocation
2026-03-03 18:55:43 -07:00
Kynan Ware
39874b7cf4
Merge pull request #12657 from yuvrajangadsingh/feature/pr-files-status
feat(pr): add changeType field to files JSON output
2026-03-03 16:04:00 -07:00
Kynan Ware
6e979c6b32
Merge pull request #12686 from 4RH1T3CT0R7/add-no-upstream-flag
Add --no-upstream flag to repo clone
2026-03-03 16:01:05 -07:00
Kynan Ware
6045a593a3
Reword --no-upstream help doc 2026-03-03 15:51:27 -07:00
Kynan Ware
d983ae0469
Merge pull request #12623 from LouisLau-art/fix/issue-list-pr-search-qualifier
fix(issue list): reject pull request-only search qualifiers
2026-03-03 14:52:35 -07:00
Babak K. Shandiz
7a590331b5
Merge pull request #12774 from cli/babakks/isolate-generated-licenses
fix(licenses): isolate generated licenses per platform (os/arch)
2026-03-03 12:12:33 +00:00
Louis Shawn
b601b307a4 test(issue list): cover additional PR search qualifier variants 2026-03-03 10:13:57 +08:00
Kynan Ware
60318613d8
Merge pull request #12720 from cli/kw/fix-invalid-ansi
Fix invalid ANSI SGR escape code in JSON and diff colorization
2026-03-02 15:12:15 -07:00
Kynan Ware
ad41bb967d
Merge pull request #12807 from maxbeizer/agent-task-view-json
Add --json support to `gh agent-task view`
2026-03-02 13:36:06 -07:00
Kynan Ware
1a5fb34493
Merge pull request #12806 from maxbeizer/agent-task-list-json
Add --json support to `gh agent-task list`
2026-03-02 13:35:27 -07:00
Kynan Ware
79796d2dc5
Merge pull request #12787 from ManManavadaria/fix-12726/item-edit-draft-issue-partial-update
fix: `gh project item-edit` error when editing Draft Issue with only one (title/body) flag
2026-03-02 12:19:53 -07:00
Kynan Ware
e725e38370
Merge pull request #12596 from elijahthis/fix/clarify-scope-error
fix: clarify scope error while creating issues for projects
2026-03-02 11:12:35 -07:00
Kynan Ware
1957a022b6
Merge pull request #12652 from VishnuVV27/fix-issue-view-comments-redundancy
Fix redundant API call in gh issue view --comments (#12606)
2026-03-02 10:58:41 -07:00
Louis Shawn
5194256928 fix(issue list): reject pull request-only search qualifiers 2026-03-02 10:50:15 -07:00
Kynan Ware
628dea6e52
Merge pull request #12375 from majiayu000/2722-fix-fork-remote-flag
fix: error when --remote flag used with repo argument
2026-03-02 10:34:02 -07:00
Kynan Ware
1c36686a61
Merge branch 'trunk' into 2722-fix-fork-remote-flag 2026-03-02 10:22:27 -07:00
Kynan Ware
0f5355e8b4
Merge pull request #12781 from itchyny/api-compile-json-content
Use pre-compiled regexp for matching Content-Type
2026-03-02 10:16:37 -07:00
Kynan Ware
98e970a6d6
Merge pull request #12615 from cli/dependabot/go_modules/github.com/gabriel-vasile/mimetype-1.4.13
chore(deps): bump github.com/gabriel-vasile/mimetype from 1.4.11 to 1.4.13
2026-03-02 09:37:31 -07:00
Kynan Ware
bb1c37d6ba
Merge pull request #12759 from cli/dependabot/go_modules/google.golang.org/grpc-1.79.1
chore(deps): bump google.golang.org/grpc from 1.78.0 to 1.79.1
2026-03-02 09:36:02 -07:00
Kynan Ware
e3ac074968
Merge pull request #12760 from cli/dependabot/github_actions/goreleaser/goreleaser-action-7.0.0
chore(deps): bump goreleaser/goreleaser-action from 6.4.0 to 7.0.0
2026-03-02 09:27:01 -07:00
Kynan Ware
453d89c2d4
Merge pull request #12795 from cli/dependabot/github_actions/actions/attest-build-provenance-4.1.0
chore(deps): bump actions/attest-build-provenance from 3.2.0 to 4.1.0
2026-03-02 09:26:34 -07:00