Skip to content

[pull] trunk from cli:trunk#96

Merged
pull[bot] merged 10 commits into
All-Blockchains:trunkfrom
cli:trunk
Oct 3, 2025
Merged

[pull] trunk from cli:trunk#96
pull[bot] merged 10 commits into
All-Blockchains:trunkfrom
cli:trunk

Conversation

@pull

@pull pull Bot commented Oct 3, 2025

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

BagToad and others added 10 commits September 30, 2025 10:45
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.
Deleted the unused ghIds helper function and the associated githubv4 import from edit.go to clean up the codebase.
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.
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.
Corrected '--tile' to '--title' in the error message shown when required flags are missing in non-interactive mode.
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.
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.
Co-authored-by: Babak K. Shandiz <babakks@github.com>
Co-authored-by: Babak K. Shandiz <babakks@github.com>
…viewer-set

`gh pr edit`: Only fetch org teams for reviewers when required
@pull pull Bot locked and limited conversation to collaborators Oct 3, 2025
@pull pull Bot added the ⤵️ pull label Oct 3, 2025
@pull pull Bot merged commit 67bf27b into All-Blockchains:trunk Oct 3, 2025
@pull pull Bot temporarily deployed to cli-automation October 3, 2025 22:15 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant