Commit graph

11279 commits

Author SHA1 Message Date
Kynan Ware
e6d9019bc9 fix(pr create): use login-based assignee mutation on github.com
When ActorAssignees is true (github.com), pass assignee logins directly
to the ReplaceActorsForAssignable mutation instead of resolving logins
to node IDs. This eliminates the need to bulk fetch all assignable
users/actors and fixes a bug where providing assignees via CLI flag
and then interactively adding metadata would fail with 'not found'
because the cached MetadataResult had no assignee data.

Changes:
- Set state.ActorAssignees = true in pr create (was missing)
- AddMetadataToIssueParams: pass assigneeLogins when ActorAssignees
  is true, skip fetch and ID resolution entirely
- CreatePullRequest/IssueCreate: call ReplaceActorsForAssignableByLogin
  after creation to assign via logins
- Consolidate replaceActorsForAssignable mutation into api/ package
  (ReplaceActorsForAssignableByLogin + ReplaceActorsForAssignableByID)
- Remove duplicate replaceActorAssigneesForEditable from editable_http.go
- Add TODO replaceActorsByLoginCleanup markers on edit paths

Fixes cli/cli#13000

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 15:21:20 -06:00
dependabot[bot]
dd1a3680d3
chore(deps): bump microsoft/setup-msbuild from 2.0.0 to 3.0.0
Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Commits](6fb0222098...30375c66a4)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-23 14:14:35 +00:00
dependabot[bot]
c255e77dde
chore(deps): bump mislav/bump-homebrew-formula-action from 3.6 to 4.1
Bumps [mislav/bump-homebrew-formula-action](https://github.com/mislav/bump-homebrew-formula-action) from 3.6 to 4.1.
- [Release notes](https://github.com/mislav/bump-homebrew-formula-action/releases)
- [Commits](56a283fa15...ccf2332299)

---
updated-dependencies:
- dependency-name: mislav/bump-homebrew-formula-action
  dependency-version: '4.1'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-23 14:14:32 +00:00
tidy-dev
8723e3bb52
Merge pull request #12972 from cli/remove-auto-labels-from-templates
Remove auto-labels from issue templates
2026-03-19 19:45:35 -04:00
tidy-dev
d77b2239e9 Remove auto-labels from issue templates
The bug_report, submit-a-request, and submit-a-design-proposal issue
templates currently auto-apply 'bug' and 'enhancement' labels. This
causes issues to arrive pre-labeled with types that may not be accurate,
making triage harder since the template-applied labels can't be trusted.

Removing auto-labels ensures all type classification happens during
triage, giving the team confidence that labeled issues have been
reviewed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-19 19:36:11 -04:00
Kynan Ware
78b958f9ae
fix(agent-task): resolve Copilot API URL dynamically (#12956)
* fix(agent-task): resolve Copilot API URL dynamically

Query viewer.copilotEndpoints.api to get the correct Copilot API URL
for the user's host instead of hardcoding api.githubcopilot.com. This
fixes 401 errors for ghe.com tenancy users whose Copilot API lives at
a different endpoint.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-18 18:14:02 +00:00
dependabot[bot]
0611b9ca0f
chore(deps): bump google.golang.org/grpc from 1.79.2 to 1.79.3
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.2 to 1.79.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.79.2...v1.79.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-18 14:03:50 +00:00
dependabot[bot]
ead34e1ed2
chore(deps): bump azure/login from 2.3.0 to 3.0.0
Bumps [azure/login](https://github.com/azure/login) from 2.3.0 to 3.0.0.
- [Release notes](https://github.com/azure/login/releases)
- [Commits](a457da9ea1...532459ea53)

---
updated-dependencies:
- dependency-name: azure/login
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-17 14:03:22 +00:00
dependabot[bot]
fb13f29f8a
chore(deps): bump advanced-security/filter-sarif from 1.0.1 to 1.1
Bumps [advanced-security/filter-sarif](https://github.com/advanced-security/filter-sarif) from 1.0.1 to 1.1.
- [Release notes](https://github.com/advanced-security/filter-sarif/releases)
- [Commits](f3b8118a93...2da736ff05)

---
updated-dependencies:
- dependency-name: advanced-security/filter-sarif
  dependency-version: '1.1'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-12 14:03:44 +00:00
William Martin
37800dd56a
Merge pull request #12915 from cli/revert-12596-fix/clarify-scope-error
Revert "fix: clarify scope error while creating issues for projects"
2026-03-12 13:06:18 +01:00
William Martin
3921788f76
Revert "fix: clarify scope error while creating issues for projects" 2026-03-12 12:55:55 +01:00
William Martin
4a3f7d9ce0
Merge pull request #12914 from cli/revert-12845-refactor/deduplicate-scope-error-handling
Revert "refactor: deduplicate scope error handling between api/client.go and project queries"
2026-03-12 12:54:54 +01:00
William Martin
d45acae604
Revert "refactor: deduplicate scope error handling between api/client.go and project queries" 2026-03-12 12:45:48 +01:00
Kynan Ware
2bf1669a6b
Merge pull request #12911 from cli/kw/deployment-oidc
Migrate Windows code signing from client secret to OIDC
2026-03-12 03:02:35 -06:00
Kynan Ware
bd12a06860 Switch deployment signing to OIDC authentication 2026-03-11 18:42:56 -06:00
tidy-dev
e8cc7f9436
Merge pull request #12894 from cli/tidy-dev/add-pitch-surfacing
Add monthly pitch surfacing workflow
2026-03-10 09:02:10 -07:00
tidy-dev
c9afc3c089 fix: add if guard to no-response job to prevent running on workflow_dispatch
Prevents no-response from accidentally closing issues when manually
dispatching the workflow for pitch surfacing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-10 11:44:55 -04:00
Babak K. Shandiz
8f2673062e
Merge pull request #12846 from yuvrajangadsingh/feat/squash-merge-commit-message
feat(repo): add --squash-merge-commit-message flag to gh repo edit
2026-03-10 15:32:56 +00:00
tidy-dev
089e461087 Add pitch surfacing workflow (monthly + manual dispatch) 2026-03-10 09:30:57 -04:00
yuvrajangadsingh
198487e166 fix: address review feedback on squash merge commit message
- reorder if checks: validate --enable-squash-merge is set before
  checking the value, and error when --enable-squash-merge=false
- use validSquashMsgValues directly in interactive prompt instead of
  duplicating the slice
- use slices.Contains in validateSquashMergeCommitMsg
- interpolate const values in Long description instead of hardcoding
- add default clause in transformSquashMergeOpts to avoid mutating
  title/message on unknown input
- move optionDiscussions to end of const block with TODO comment
- add test for unknown input and --enable-squash-merge=false case
2026-03-10 18:27:21 +05:30
yuvrajangadsingh
3baf83a339 fix: gofmt alignment in test struct literals 2026-03-10 16:55:50 +05:30
yuvrajangadsingh
4ae0c5851b feat(repo): add --squash-merge-commit-message flag to gh repo edit
Add a single --squash-merge-commit-message flag that maps to both
squash_merge_commit_title and squash_merge_commit_message API fields.

Supported values:
- default: COMMIT_OR_PR_TITLE + COMMIT_MESSAGES
- pr-title: PR_TITLE + BLANK
- pr-title-commits: PR_TITLE + COMMIT_MESSAGES
- pr-title-description: PR_TITLE + PR_BODY

The flag requires --enable-squash-merge to be set alongside it. In
interactive mode, the squash merge commit message prompt appears when
squash merging is selected.

Closes #10092
2026-03-10 16:55:50 +05:30
Babak K. Shandiz
19864b9e1e
Merge pull request #12886 from cli/dependabot/go_modules/golang.org/x/sync-0.20.0
chore(deps): bump golang.org/x/sync from 0.19.0 to 0.20.0
2026-03-09 15:08:44 +00:00
Babak K. Shandiz
4ae2743bf1
Merge pull request #12655 from yuvrajangadsingh/feature/pr-diff-exclude
feat(pr diff): add --exclude flag to filter files from diff output
2026-03-09 15:08:19 +00:00
dependabot[bot]
1a7f2aa0c0
chore(deps): bump golang.org/x/sync from 0.19.0 to 0.20.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.19.0 to 0.20.0.
- [Commits](https://github.com/golang/sync/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-version: 0.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 14:59:56 +00:00
Yuvraj Angad Singh
78891fc6e5
Merge branch 'trunk' into feature/pr-diff-exclude 2026-03-09 19:35:51 +05:30
yuvrajangadsingh
ea83ca0ca9 refactor: change extractFileName param from []byte to string 2026-03-09 19:26:29 +05:30
Babak K. Shandiz
27fb2da1c8
fix: improve docs around IssueRepoInfo
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-09 12:16:02 +00:00
Babak K. Shandiz
9f5dfa80c8
test(issue transfer): update stub for IssueRepositoryInfo query
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-09 11:49:44 +00:00
Babak K. Shandiz
aad0239683
fix(issue transfer): use IssueRepoInfo to fetch minimal fields for issues
Only the destination repo ID is needed for issue transfer. Switch from
GitHubRepo to IssueRepoInfo to use minimal fields appropriate for issues.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-09 11:49:22 +00:00
Babak K. Shandiz
64416e1ea1
test(issue create): update stubs for IssueRepositoryInfo query
Update test mocks to match the renamed GraphQL query used by
IssueRepoInfo, and switch to StubIssueRepoInfoResponse helper.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-09 11:35:13 +00:00
Babak K. Shandiz
1d95b633e3
fix(issue create): use IssueRepoInfo to avoid requiring Contents:Read permission
Switch issue create from GitHubRepo to IssueRepoInfo so that
gh issue create works with fine-grained PATs that only have
Issues:Write and Metadata:Read permissions.

Fixes cli/cli#12798

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-09 11:33:12 +00:00
Babak K. Shandiz
11e5be7842
test(api): add tests for GitHubRepo and IssueRepoInfo
Add success, not-found, and edge case tests for both GitHubRepo and
IssueRepoInfo, covering field population, parent repo handling,
viewer permission checks, and issues-disabled scenarios.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-09 11:30:46 +00:00
Babak K. Shandiz
5e2b2779d1
refactor(api): add IssueRepoInfo for minimal issue repo queries
Add a new IssueRepoInfo function that fetches only the fields needed
for issue creation (id, name, owner, hasIssuesEnabled, viewerPermission),
avoiding defaultBranchRef and other fields that require Contents:Read.

Also add StubIssueRepoInfoResponse helper to httpmock for testing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-09 11:30:02 +00:00
Babak K. Shandiz
6e49747f49
Merge pull request #12851 from cli/dependabot/go_modules/google.golang.org/grpc-1.79.2
chore(deps): bump google.golang.org/grpc from 1.79.1 to 1.79.2
2026-03-08 01:03:26 +00:00
Kynan Ware
3d86738017
Merge pull request #12864 from cli/kw/update-build-from-source-to-go-1.26
Update Go version requirement to 1.26+
2026-03-07 10:37:18 -07:00
Kynan Ware
7fa453e467 Update Go version requirement to 1.26+ 2026-03-07 10:10:01 -07:00
William Martin
02196707e6
Merge pull request #12860 from cli/kw/bump-go-1.26
Bump Go from 1.25.7 to 1.26.1
2026-03-07 10:20:02 +01:00
Kynan Ware
b18358b754 Bump golangci-lint from v2.6.0 to v2.11.0 for Go 1.26 support
golangci-lint v2.6.0 was built with Go 1.25 and cannot lint code targeting
Go 1.26.1. Go 1.26 support was added in golangci-lint v2.9.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 21:24:41 -07:00
Kynan Ware
1524ea21ae Bump Go from 1.25.7 to 1.26.1 to fix stdlib vulnerabilities
Fixes 5 Go standard library vulnerabilities found by govulncheck:
- GO-2026-4603: html/template URL escaping
- GO-2026-4602: os FileInfo root escape
- GO-2026-4601: net/url IPv6 parsing
- GO-2026-4600: crypto/x509 malformed cert panic
- GO-2026-4599: crypto/x509 email constraint enforcement

Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 21:21:21 -07:00
Kynan Ware
59ba50885f
Merge pull request #12854 from cli/kw/pr-view-copilot-friendly-name
`gh pr view` and `gh issue view`: show friendly display names for all actors
2026-03-06 20:45:38 -07:00
Kynan Ware
e047fa6b0e Address review comments: use actorDisplayName for Copilot author display
- Add actorDisplayName call in CommentAuthor.DisplayName for consistency
- Use require.Equal in TestActorDisplayName instead of manual comparisons
- Simplify user type name constant usage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 20:36:46 -07:00
Kynan Ware
3651c289ed Show friendly display names in gh issue view
Apply DisplayName() to author and assignee display in issue view,
consistent with the pr view changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 12:01:06 -07:00
Kynan Ware
7198d270b4 Add generic actorDisplayName for all actor display names
Replace copilotDisplayName with actorDisplayName(typeName, login, name)
which handles all actor types: known bots get friendly names (e.g.
Copilot → 'Copilot (AI)'), regular bots return login, users with
names return 'login (Name)', others return login.

All DisplayName() methods on Author, CommentAuthor, GitHubUser,
AssignableUser, AssignableBot, RequestedReviewer, and ReviewerBot
now delegate to actorDisplayName with their available fields.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 11:55:09 -07:00
Kynan Ware
04bc0d27f4 Show friendly Copilot (AI) name in gh pr view
Add CopilotDisplayName helper that translates known Copilot bot
logins (copilot-pull-request-reviewer, copilot-swe-agent) to the
friendly 'Copilot (AI)' display name. Applied to:

- PullRequestReview.AuthorLogin() — review comment author
- Comment.AuthorLogin() — PR/issue comment author
- parseReviewers() in pr view — reviewer list display

This ensures gh pr view shows 'Copilot (AI)' instead of the raw
'copilot-pull-request-reviewer' login for both the reviewer status
line and any review comments left by Copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 11:19:43 -07:00
yuvrajangadsingh
a331ef7f8f fix: align example indentation with codebase convention 2026-03-06 23:07:32 +05:30
yuvrajangadsingh
d7f1d8e89d fix: address review feedback for --exclude flag
- add usage examples to --help output
- use path.Match instead of filepath.Match for OS-consistent behavior
- rename patterns to excludePatterns for clarity
- simplify splitDiffSections using strings.Split
2026-03-06 23:07:32 +05:30
yuvrajangadsingh
8bd48afa87 fix: share diffHeaderRegexp between changedFilesNames and extractFileName, fix gofmt 2026-03-06 23:07:32 +05:30
yuvrajangadsingh
18536dc2b1 feat(pr diff): add --exclude flag to filter files from diff output
Add a new --exclude (-e) flag to gh pr diff that allows users to exclude
files matching glob patterns from the diff output. This is useful for
filtering out auto-generated files, vendor directories, or other noise
when reviewing pull requests.

Supports standard glob patterns and can be specified multiple times.
Patterns match against both the full path and basename.

Closes #8739
2026-03-06 23:07:32 +05:30
Kynan Ware
93c4340f29
Merge pull request #12627 from cli/kw/pr-create-multi-select-with-search-ccr
`gh pr create`: login-based reviewer requests and search-based interactive selection
2026-03-06 10:24:19 -07:00