Commit graph

10421 commits

Author SHA1 Message Date
copilot-swe-agent[bot]
cd7aa68b59 Initial plan 2025-10-22 14:51:48 +00:00
Kynan Ware
40512a8f7b
Merge pull request #11987 from cli/kw/fix-projectsv1-fetching-in-pr-edit
fix `gh pr edit`: do not fetch V1 projects on unsupported GitHub hosts
2025-10-21 19:21:08 -06:00
Kynan Ware
31398fe765 Add test for non-interactive projects v1 unsupported
Introduces a test case to ensure that when editing pull requests non-interactively and projects v1 is unsupported, v1 project metadata is not fetched and only v2 project queries are made.
2025-10-21 19:09:14 -06:00
Kynan Ware
ec526bf72b Inject Detector mock in edit command tests
Added Detector field with EnabledDetectorMock to EditOptions in issue and PR edit command tests to ensure feature detection logic is exercised during test runs. Also updated EditableOptionsFetch signature in pr/edit/edit_test.go to include projectsV1Support parameter for compatibility with shared.FetchOptions.
2025-10-21 15:55:42 -06:00
Kynan Ware
e373ad6c9f Pass ProjectsV1Support to FetchOptions functions
Update FetchOptions and related function signatures to accept a ProjectsV1Support parameter, enabling conditional logic based on project support. This change improves flexibility for handling project fields in issue and PR editing flows.
2025-10-21 15:03:52 -06:00
Kynan Ware
e627f0132e
Merge pull request #11612 from cli/dependabot/github_actions/actions/attest-build-provenance-3.0.0
chore(deps): bump actions/attest-build-provenance from 2.4.0 to 3.0.0
2025-10-17 14:51:03 -06:00
Kynan Ware
ff185a1913
Merge pull request #11659 from cli/dependabot/go_modules/github.com/gabriel-vasile/mimetype-1.4.10
chore(deps): bump github.com/gabriel-vasile/mimetype from 1.4.9 to 1.4.10
2025-10-17 14:25:28 -06:00
dependabot[bot]
56f9f2bd62
chore(deps): bump github.com/gabriel-vasile/mimetype
Bumps [github.com/gabriel-vasile/mimetype](https://github.com/gabriel-vasile/mimetype) from 1.4.9 to 1.4.10.
- [Release notes](https://github.com/gabriel-vasile/mimetype/releases)
- [Commits](https://github.com/gabriel-vasile/mimetype/compare/v1.4.9...v1.4.10)

---
updated-dependencies:
- dependency-name: github.com/gabriel-vasile/mimetype
  dependency-version: 1.4.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-17 20:15:13 +00:00
Kynan Ware
52bdb56b07
Merge pull request #11830 from cli/dependabot/go_modules/github.com/sigstore/sigstore-go-1.1.3
chore(deps): Bump github.com/sigstore/sigstore-go from 1.1.0 to 1.1.3
2025-10-17 12:01:32 -06:00
Kynan Ware
5d8b4265c4
Merge pull request #11881 from cli/dependabot/github_actions/github/codeql-action-4
chore(deps): bump github/codeql-action from 3 to 4
2025-10-17 11:55:50 -06:00
Kynan Ware
fd651e9adc
Update .github/workflows/govulncheck.yml 2025-10-17 11:29:37 -06:00
Babak K. Shandiz
d2535897fd
Merge pull request #11922 from cli/babakks/fix-login-through-unix-socket
Fix `auth login` and `auth refresh` to use UNIX socket
2025-10-15 14:51:07 +01:00
Babak K. Shandiz
0ce728f1ae
chore: run go mod tidy
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-13 20:07:41 +01:00
Babak K. Shandiz
5685b9a443
refactor(auth refresh): use PlainHttpClient instead of zero http.Client
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-13 16:51:13 +01:00
Babak K. Shandiz
365ca1a901
refactor(auth login): use PlainHttpClient for OAuth flow
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-13 16:51:11 +01:00
Babak K. Shandiz
ae9a7ed542
refactor(authflow): receive HTTP client via args
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-13 16:48:10 +01:00
Babak K. Shandiz
2794f7b8d6
fix(factory): add PlainHttpClient to factory
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-13 16:42:18 +01:00
Babak K. Shandiz
55fbad3e49
test(api): assert SkipDefaultHeaders is honoured
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-13 16:37:32 +01:00
Babak K. Shandiz
b81c2495d2
fix(api): expose SkipDefaultHeaders option
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-13 16:37:04 +01:00
Babak K. Shandiz
b9e04ef83d
test(api): improve NewHTTPClient test assertions
The assertions should check for header values instead of single string,
because when getting a single header value, we get an empty string if
the header is not set or is set to an empty string. So, to make sure a
header is not set we should check the `Values` slice which is `nil` only
if the header is missing.

Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-13 16:33:03 +01:00
Kynan Ware
5eb6549dc7
Merge pull request #11896 from cli/kw/fix-agent-task-targets-fork
`gh agent-task create`: Fix targetting upstream instead of default repo
2025-10-10 11:12:06 -06:00
Kynan Ware
8840df2eb3 Fix agentTaskCmd to use repoResolvingCmdFactory
`agent-task` uses smart base repo func to fix bug with resolving upstream instead of local repo.
2025-10-10 10:39:52 -06:00
dependabot[bot]
af0905efeb
chore(deps): bump github/codeql-action from 3 to 4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-08 14:03:20 +00:00
Babak K. Shandiz
c8152ed44e
Merge pull request #11879 from cli/kw/fix-progress-indicator-for-create-follow
`gh agent-task create`: Fix `--follow` not killing the progress indicator
2025-10-08 10:55:53 +02:00
Kynan Ware
91c6bc609a Add new displaying message to test expectation
Updated the Test_createRun test to expect a message indicating that session logs are being displayed for the job
2025-10-07 23:37:43 -06:00
Kynan Ware
a78bb5e899 Fix --follow not killing the progress indicator
Fixes --follow not stopping the progress indicator. Also includes a nice message to indicate what is happening because even after we create the agent task, there's a period of time where we poll and receive nothing as the task session starts. We want there to be some sort of feedback in that period of time to not make the user panic and think it has hanged.
2025-10-07 23:19:45 -06:00
Kynan Ware
67bf27bf0c
Merge pull request #11835 from cli/kw/do-not-request-org-teams-for-reviewer-set
`gh pr edit`: Only fetch org teams for reviewers when required
2025-10-03 12:25:55 -06:00
Kynan Ware
43e834a691
Apply suggestion from @babakks
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-10-02 09:55:58 -06:00
Kynan Ware
8d85946098
Apply suggestion from @babakks
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-10-02 09:55:45 -06:00
Kynan Ware
bf728893fa Fix argument order in httpStubs test functions
Swaps the argument order of the httpStubs functions in edit_test.go to match the expected (t *testing.T, reg *httpmock.Registry) signature. This improves consistency and prevents potential confusion or errors when calling these test helpers.
2025-10-02 09:54:01 -06:00
Babak K. Shandiz
32a9c4ba26
Merge pull request #11838 from luxass/handle-correct-count-for-cache-delete
fix(cache delete): report correct deleted count for key and key+ref deletions
2025-10-02 11:45:39 +01:00
Babak K. Shandiz
ab9c99ec04
docs(cache delete): remove redundant comment
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-02 11:36:00 +01:00
Babak K. Shandiz
d574873f3b
docs(cache delete): add godoc for deleteCacheByKey
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-02 11:33:26 +01:00
Kynan Ware
66fae72872 Remove default empty slices in RemovePullRequestReviews
Eliminates unnecessary initialization of users and teams to empty slices in RemovePullRequestReviews. Also updates the request body struct to use 'omitempty' for reviewers and team_reviewers, ensuring empty fields are omitted from the JSON payload.
2025-10-01 16:12:06 -06:00
Kynan Ware
52bb1dec30 Fix typo in error message for required flags
Corrected '--tile' to '--title' in the error message shown when required flags are missing in non-interactive mode.
2025-10-01 16:09:33 -06:00
Kynan Ware
848faf8115 Refactor reviewer partitioning in PR edit command
Extracted logic for splitting reviewer identifiers into users and teams into a new helper function, partitionUsersAndTeams. Updated updatePullRequestReviews to use this function for both adding and removing reviewers, improving code clarity and maintainability. Also clarified comments regarding PR author handling.
2025-10-01 16:02:05 -06:00
Kynan Ware
57fce1dc3a Escape repo owner and name in PR reviewer API paths
Updated AddPullRequestReviews and RemovePullRequestReviews to use url.PathEscape for repo owner and name in API paths. This ensures correct handling of special characters in repository identifiers.
2025-10-01 15:55:24 -06:00
Kynan Ware
7094a55eec Remove unused ghIds function and githubv4 import
Deleted the unused ghIds helper function and the associated githubv4 import from edit.go to clean up the codebase.
2025-10-01 15:47:39 -06:00
Lucas
ccfc2c3045
fix(cache): report correct deleted count for key and key+ref deletions
Previously, deleting caches by key or key+ref could misreport the number of deleted entries, especially when multiple caches matched the criteria. This change ensures the actual number of deleted caches is reported by consuming the API response's total_count field.
2025-10-01 18:44:24 +02:00
Kynan Ware
87468f40db Refactor PR reviewer editing to use REST API and optimize team fetch
Switches pull request reviewer add/remove operations from GraphQL to the REST API, enabling separate add and remove calls for reviewers and teams. Refactors reviewer editing logic to avoid fetching organization teams unless required for interactive editing, improving performance for non-interactive flows. Updates tests and supporting code to reflect the new reviewer management and metadata fetching behavior.
2025-09-30 10:45:44 -06:00
Babak K. Shandiz
52ba836605
Merge pull request #11805 from juejinyuxitu/FieldsFuncSeq
refactor: use strings.FieldsFuncSeq to reduce memory allocations
2025-09-30 11:18:57 +01:00
dependabot[bot]
0e904d5ef5
chore(deps): Bump github.com/sigstore/sigstore-go from 1.1.0 to 1.1.3
Bumps [github.com/sigstore/sigstore-go](https://github.com/sigstore/sigstore-go) from 1.1.0 to 1.1.3.
- [Release notes](https://github.com/sigstore/sigstore-go/releases)
- [Commits](https://github.com/sigstore/sigstore-go/compare/v1.1.0...v1.1.3)

---
updated-dependencies:
- dependency-name: github.com/sigstore/sigstore-go
  dependency-version: 1.1.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-29 18:13:42 +00:00
Eugene
a9efc8d3d2
Merge pull request #11801 from cli/eugene/remove_hidden_for_release_verify
visible for  `release verify`  and `release verify-asset` cmd
2025-09-29 10:43:09 -04:00
Kynan Ware
b76bc7706a
Merge pull request #11544 from benjlevesque/auth-status-json-output-8635
Add JSON output to `gh auth status`
2025-09-25 09:50:46 -06:00
Babak K. Shandiz
38d6a83e35
test(auth status): correctly replace JSON-escaped paths
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-25 10:51:47 +01:00
ejahnGithub
a2034545cc update the description 2025-09-24 14:04:28 -04:00
juejinyuxitu
f5cf156af1 refactor: use strings.FieldsFuncSeq to reduce memory allocations
Signed-off-by: juejinyuxitu <juejinyuxitu@outlook.com>
2025-09-24 23:11:17 +08:00
Melissa Xie
07ccec116d
Merge pull request #11804 from cli/babakks/add-co-alias-to-pr-checkout
Add alias `co` for `pr checkout`
2025-09-24 11:08:42 -04:00
Babak K. Shandiz
0ec5f13283
fix(pr checkout): add alias co
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-24 14:56:59 +01:00
ejahnGithub
c1969f0523 remove hidden value for release verify cmd 2025-09-23 16:45:26 -04:00