Merged
Conversation
Address PR review comments: code consistency and DRY improvements - Add botTypeName const for consistency with teamTypeName - Create extractTeamSlugs helper using strings.SplitN to simplify team slug extraction logic - Replace duplicate code in AddPullRequestReviews and RemovePullRequestReviews with extractTeamSlugs helper - Fix ClientMutationId naming with explicit graphql tag for consistency with other mutations in the codebase
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Consolidate all review-related types, methods, and functions into queries_pr_review.go for better code organization. The file is now ordered by logical sections: review data types, review status, review requests, reviewer candidates, API operations, and helpers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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>
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>
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>
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>
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>
Mark the GHES ID-resolution branch in AddMetadataToIssueParams for cleanup once GHES supports requestReviewsByLogin. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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>
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>
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>
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>
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>
…rch-ccr `gh pr create`: login-based reviewer requests and search-based interactive selection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )