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>
This commit is contained in:
parent
6341588f90
commit
8f62e8116d
1 changed files with 3 additions and 1 deletions
|
|
@ -557,7 +557,9 @@ func SuggestedReviewerActors(client *Client, repo ghrepo.Interface, prID string,
|
|||
func SuggestedReviewerActorsForRepo(client *Client, repo ghrepo.Interface, query string) ([]ReviewerCandidate, int, error) {
|
||||
type responseData struct {
|
||||
Repository struct {
|
||||
// Check for Copilot availability by looking at any open PR's suggested reviewers
|
||||
// HACK: There's no repo-level API to check Copilot reviewer eligibility,
|
||||
// so we piggyback on an open PR's suggestedReviewerActors to detect
|
||||
// whether Copilot is available as a reviewer for this repository.
|
||||
PullRequests struct {
|
||||
Nodes []struct {
|
||||
SuggestedActors struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue