Skip to content

gh pr edit --add-reviewer fails when called before Copilot has completed a review #11245

@CraigSiemens

Description

@CraigSiemens

Describe the bug

We have a github workflow that runs when the PR is opened to add reviewers. More often than not, the workflow fails with the error message '' not found. Re-running the failed workflow then usually succeeds.

Affected version

2.74.2

Steps to reproduce the behavior

Running the following command in a workflow triggered by opening a PR

gh pr edit --add-reviewer {logins}

Expected vs actual behavior

It should successfully add the reviewers the first time it is run.

It usually fails with the error message '' not found. Rerunning the workflow usually succeeds.

Logs

Redacted Logs

2025-07-07T14:51:06.2920899Z [git remote -v]
2025-07-07T14:51:06.2945330Z [git config --get-regexp ^remote\..*\.gh-resolved$]
2025-07-07T14:51:06.2961963Z * Request at 2025-07-07 14:51:06.29605901 +0000 UTC m=+0.082660327
2025-07-07T14:51:06.2963247Z * Request to https://api.github.com/graphql
2025-07-07T14:51:06.2964708Z > POST /graphql HTTP/1.1
2025-07-07T14:51:06.2965887Z > Host: api.github.com
2025-07-07T14:51:06.2967599Z > Accept: application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview
2025-07-07T14:51:06.2969872Z > Authorization: token ████████████████████
2025-07-07T14:51:06.2971033Z > Content-Length: 704
2025-07-07T14:51:06.2972023Z > Content-Type: application/json; charset=utf-8
2025-07-07T14:51:06.2973034Z > Graphql-Features: merge_queue
2025-07-07T14:51:06.2974123Z > Time-Zone: /UTC
2025-07-07T14:51:06.2975160Z > User-Agent: GitHub CLI 2.74.2
2025-07-07T14:51:06.2975782Z 
2025-07-07T14:51:06.2976089Z GraphQL query:
2025-07-07T14:51:06.2977445Z query PullRequestByNumber($owner: String!, $repo: String!, $pr_number: Int!) {
2025-07-07T14:51:06.2978932Z     repository(owner: $owner, name: $repo) {
2025-07-07T14:51:06.2983711Z       pullRequest(number: $pr_number) {id,url,title,body,baseRefName,reviewRequests(first: 100) {nodes {requestedReviewer {__typename,...on User{login},...on Team{organization{login}name,slug}}}},labels(first:100){nodes{id,name,description,color},totalCount},milestone{number,title,description,dueOn},assignees(first:100){nodes{id,login,name},totalCount},number,assignedActors(first: 10) {nodes {...on User {id,login,name,__typename}...on Bot {id,login,__typename}},totalCount}}
2025-07-07T14:51:06.2988599Z     }
2025-07-07T14:51:06.2989324Z   }
2025-07-07T14:51:06.2990513Z GraphQL variables: {"owner":"{org}","pr_number":12703,"repo":"{repo}"}
2025-07-07T14:51:06.2991417Z 
2025-07-07T14:51:06.6637609Z < HTTP/2.0 200 OK
2025-07-07T14:51:06.6640413Z < Access-Control-Allow-Origin: *
2025-07-07T14:51:06.6648793Z < Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
2025-07-07T14:51:06.6654701Z < Content-Security-Policy: default-src 'none'
2025-07-07T14:51:06.6656566Z < Content-Type: application/json; charset=utf-8
2025-07-07T14:51:06.6658270Z < Date: Mon, 07 Jul 2025 14:51:06 GMT
2025-07-07T14:51:06.6660202Z < Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
2025-07-07T14:51:06.6661818Z < Server: github.com
2025-07-07T14:51:06.6663285Z < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
2025-07-07T14:51:06.6664990Z < Vary: Accept-Encoding, Accept, X-Requested-With
2025-07-07T14:51:06.6666412Z < X-Accepted-Oauth-Scopes: repo
2025-07-07T14:51:06.6667877Z < X-Content-Type-Options: nosniff
2025-07-07T14:51:06.6669501Z < X-Frame-Options: deny
2025-07-07T14:51:06.6672010Z < X-Github-Media-Type: github.v4; param=merge-info-preview.nebula-preview; format=json
2025-07-07T14:51:06.6674584Z < X-Github-Request-Id: BA41:18A266:F3A2E:1E7F40:686BDEDA
2025-07-07T14:51:06.6747824Z < X-Oauth-Scopes: read:discussion, read:org, repo
2025-07-07T14:51:06.6749363Z < X-Ratelimit-Limit: 5000
2025-07-07T14:51:06.6750631Z < X-Ratelimit-Remaining: 4992
2025-07-07T14:51:06.6751761Z < X-Ratelimit-Reset: 1751903432
2025-07-07T14:51:06.6752868Z < X-Ratelimit-Resource: graphql
2025-07-07T14:51:06.6753982Z < X-Ratelimit-Used: 8
2025-07-07T14:51:06.6754970Z < X-Xss-Protection: 0
2025-07-07T14:51:06.6755550Z 
2025-07-07T14:51:06.6755940Z {
2025-07-07T14:51:06.6756750Z   "data": {
2025-07-07T14:51:06.6757640Z     "repository": {
2025-07-07T14:51:06.6758599Z       "pullRequest": {
2025-07-07T14:51:06.6760968Z         "url": "https://github.com/{org}/{repo}/pull/12703",
2025-07-07T14:51:06.6762993Z         {redacted}
2025-07-07T14:51:06.6771435Z         "baseRefName": "develop",
2025-07-07T14:51:06.6772989Z         "reviewRequests": {
2025-07-07T14:51:06.6774396Z           "nodes": [
2025-07-07T14:51:06.6775462Z             {
2025-07-07T14:51:06.6776405Z               "requestedReviewer": {
2025-07-07T14:51:06.6777527Z                 "__typename": "Bot"
2025-07-07T14:51:06.6778590Z               }
2025-07-07T14:51:06.6779480Z             },
2025-07-07T14:51:06.6780356Z             {redacted}
2025-07-07T14:51:06.6805061Z           ]
2025-07-07T14:51:06.6805922Z         },
2025-07-07T14:51:06.6806777Z         "labels": {
2025-07-07T14:51:06.6807743Z           "nodes": [
2025-07-07T14:51:06.6808783Z             {redacted}
2025-07-07T14:51:06.6825687Z           ],
2025-07-07T14:51:06.6826637Z           "totalCount": 2
2025-07-07T14:51:06.6827609Z         },
2025-07-07T14:51:06.6828502Z         "milestone": null,
2025-07-07T14:51:06.6829521Z         "assignees": {
2025-07-07T14:51:06.6830474Z           "nodes": [],
2025-07-07T14:51:06.6831424Z           "totalCount": 0
2025-07-07T14:51:06.6832384Z         },
2025-07-07T14:51:06.6833249Z         "number": 12703,
2025-07-07T14:51:06.6834251Z         "assignedActors": {
2025-07-07T14:51:06.6835252Z           "nodes": [],
2025-07-07T14:51:06.6836222Z           "totalCount": 0
2025-07-07T14:51:06.6837176Z         }
2025-07-07T14:51:06.6838023Z       }
2025-07-07T14:51:06.6838848Z     }
2025-07-07T14:51:06.6839652Z   }
2025-07-07T14:51:06.6840460Z }
2025-07-07T14:51:06.6840904Z 
2025-07-07T14:51:06.6841324Z * Request took 367.812595ms
2025-07-07T14:51:06.6842658Z * Request at 2025-07-07 14:51:06.664706079 +0000 UTC m=+0.451307396
2025-07-07T14:51:06.6844076Z * Request to https://api.github.com/graphql
2025-07-07T14:51:06.6845280Z > POST /graphql HTTP/1.1
2025-07-07T14:51:06.6846302Z > Host: api.github.com
2025-07-07T14:51:06.6848006Z > Accept: application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview
2025-07-07T14:51:06.6850073Z > Authorization: token ████████████████████
2025-07-07T14:51:06.6851229Z > Content-Length: 463
2025-07-07T14:51:06.6852253Z > Content-Type: application/json
2025-07-07T14:51:06.6853378Z > Graphql-Features: merge_queue
2025-07-07T14:51:06.6854429Z > Time-Zone: /UTC
2025-07-07T14:51:06.6855376Z > User-Agent: GitHub CLI 2.74.2
2025-07-07T14:51:06.6856033Z 
2025-07-07T14:51:06.6856443Z GraphQL query:
2025-07-07T14:51:06.6861117Z query PullRequestProjectItems($endCursor:String$name:String!$number:Int!$owner:String!){repository(owner: $owner, name: $name){pullRequest(number: $number){projectItems(first: 100, after: $endCursor){nodes{id,project{id,title},status:fieldValueByName(name: "Status"){... on ProjectV2ItemFieldSingleSelectValue{optionId,name}}},pageInfo{hasNextPage,endCursor}}}}}
2025-07-07T14:51:06.6866343Z GraphQL variables: {"endCursor":null,"name":"{repo}","number":12703,"owner":"{org}"}
2025-07-07T14:51:06.6867583Z 
2025-07-07T14:51:06.7674196Z < HTTP/2.0 200 OK
2025-07-07T14:51:06.7675809Z < Access-Control-Allow-Origin: *
2025-07-07T14:51:06.7680896Z < Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
2025-07-07T14:51:06.7685554Z < Content-Security-Policy: default-src 'none'
2025-07-07T14:51:06.7686920Z < Content-Type: application/json; charset=utf-8
2025-07-07T14:51:06.7688149Z < Date: Mon, 07 Jul 2025 14:51:06 GMT
2025-07-07T14:51:06.7689856Z < Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
2025-07-07T14:51:06.7691846Z < Server: github.com
2025-07-07T14:51:06.7693237Z < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
2025-07-07T14:51:06.7694894Z < Vary: Accept-Encoding, Accept, X-Requested-With
2025-07-07T14:51:06.7696180Z < X-Accepted-Oauth-Scopes: repo
2025-07-07T14:51:06.7697354Z < X-Content-Type-Options: nosniff
2025-07-07T14:51:06.7698680Z < X-Frame-Options: deny
2025-07-07T14:51:06.7700277Z < X-Github-Media-Type: github.v4; param=merge-info-preview.nebula-preview; format=json
2025-07-07T14:51:06.7702082Z < X-Github-Request-Id: BA41:18A266:F3BAA:1E826B:686BDEDA
2025-07-07T14:51:06.7703471Z < X-Oauth-Scopes: read:discussion, read:org, repo
2025-07-07T14:51:06.7704708Z < X-Ratelimit-Limit: 5000
2025-07-07T14:51:06.7705755Z < X-Ratelimit-Remaining: 4991
2025-07-07T14:51:06.7706821Z < X-Ratelimit-Reset: 1751903432
2025-07-07T14:51:06.7708064Z < X-Ratelimit-Resource: graphql
2025-07-07T14:51:06.7709804Z < X-Ratelimit-Used: 9
2025-07-07T14:51:06.7710839Z < X-Xss-Protection: 0
2025-07-07T14:51:06.7711433Z 
2025-07-07T14:51:06.7711811Z {
2025-07-07T14:51:06.7712832Z   "errors": [
2025-07-07T14:51:06.7713705Z     {
2025-07-07T14:51:06.7714602Z       "type": "INSUFFICIENT_SCOPES",
2025-07-07T14:51:06.7715689Z       "locations": [
2025-07-07T14:51:06.7716616Z         {
2025-07-07T14:51:06.7717469Z           "line": 1,
2025-07-07T14:51:06.7718407Z           "column": 207
2025-07-07T14:51:06.7719353Z         }
2025-07-07T14:51:06.7720185Z       ],
2025-07-07T14:51:06.7723872Z       "message": "Your token has not been granted the required scopes to execute this query. The 'id' field requires one of the following scopes: ['read:project'], but your token has only been granted the: ['read:discussion', 'read:org', 'repo'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens."
2025-07-07T14:51:06.7728617Z     },
2025-07-07T14:51:06.7729777Z     {
2025-07-07T14:51:06.7731020Z       "type": "INSUFFICIENT_SCOPES",
2025-07-07T14:51:06.7732549Z       "locations": [
2025-07-07T14:51:06.7733845Z         {
2025-07-07T14:51:06.7735003Z           "line": 1,
2025-07-07T14:51:06.7736259Z           "column": 218
2025-07-07T14:51:06.7737535Z         }
2025-07-07T14:51:06.7738633Z       ],
2025-07-07T14:51:06.7743426Z       "message": "Your token has not been granted the required scopes to execute this query. The 'id' field requires one of the following scopes: ['read:project'], but your token has only been granted the: ['read:discussion', 'read:org', 'repo'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens."
2025-07-07T14:51:06.7747428Z     },
2025-07-07T14:51:06.7748272Z     {
2025-07-07T14:51:06.7749162Z       "type": "INSUFFICIENT_SCOPES",
2025-07-07T14:51:06.7750265Z       "locations": [
2025-07-07T14:51:06.7751179Z         {
2025-07-07T14:51:06.7752026Z           "line": 1,
2025-07-07T14:51:06.7752951Z           "column": 221
2025-07-07T14:51:06.7753883Z         }
2025-07-07T14:51:06.7754704Z       ],
2025-07-07T14:51:06.7758449Z       "message": "Your token has not been granted the required scopes to execute this query. The 'title' field requires one of the following scopes: ['read:project'], but your token has only been granted the: ['read:discussion', 'read:org', 'repo'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens."
2025-07-07T14:51:06.7762246Z     },
2025-07-07T14:51:06.7763065Z     {
2025-07-07T14:51:06.7763947Z       "type": "INSUFFICIENT_SCOPES",
2025-07-07T14:51:06.7765052Z       "locations": [
2025-07-07T14:51:06.7765957Z         {
2025-07-07T14:51:06.7766795Z           "line": 1,
2025-07-07T14:51:06.7767719Z           "column": 311
2025-07-07T14:51:06.7768727Z         }
2025-07-07T14:51:06.7769547Z       ],
2025-07-07T14:51:06.7773376Z       "message": "Your token has not been granted the required scopes to execute this query. The 'optionId' field requires one of the following scopes: ['read:project'], but your token has only been granted the: ['read:discussion', 'read:org', 'repo'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens."
2025-07-07T14:51:06.7778896Z     },
2025-07-07T14:51:06.7779869Z     {
2025-07-07T14:51:06.7780891Z       "type": "INSUFFICIENT_SCOPES",
2025-07-07T14:51:06.7782156Z       "locations": [
2025-07-07T14:51:06.7783195Z         {
2025-07-07T14:51:06.7784143Z           "line": 1,
2025-07-07T14:51:06.7785188Z           "column": 320
2025-07-07T14:51:06.7786263Z         }
2025-07-07T14:51:06.7787208Z       ],
2025-07-07T14:51:06.7791450Z       "message": "Your token has not been granted the required scopes to execute this query. The 'name' field requires one of the following scopes: ['read:project'], but your token has only been granted the: ['read:discussion', 'read:org', 'repo'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens."
2025-07-07T14:51:06.7795839Z     }
2025-07-07T14:51:06.7796768Z   ]
2025-07-07T14:51:06.7797697Z }
2025-07-07T14:51:06.7798212Z 
2025-07-07T14:51:06.7798697Z * Request took 102.787005ms
2025-07-07T14:51:06.7800319Z * Request at 2025-07-07 14:51:06.767758882 +0000 UTC m=+0.554360189
2025-07-07T14:51:06.7802048Z * Request to https://api.github.com/graphql
2025-07-07T14:51:06.7803483Z > POST /graphql HTTP/1.1
2025-07-07T14:51:06.7804703Z > Host: api.github.com
2025-07-07T14:51:06.7806725Z > Accept: application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview
2025-07-07T14:51:06.7809831Z > Authorization: token ████████████████████
2025-07-07T14:51:06.7811313Z > Content-Length: 45
2025-07-07T14:51:06.7812704Z > Content-Type: application/json
2025-07-07T14:51:06.7814234Z > Graphql-Features: merge_queue
2025-07-07T14:51:06.7815665Z > Time-Zone: /UTC
2025-07-07T14:51:06.7816921Z > User-Agent: GitHub CLI 2.74.2
2025-07-07T14:51:06.7817622Z 
2025-07-07T14:51:06.7818245Z * Request at 2025-07-07 14:51:06.767849014 +0000 UTC m=+0.554450321
2025-07-07T14:51:06.7819497Z {
2025-07-07T14:51:06.7820425Z   "query": "query UserCurrent{viewer{login}}"
2025-07-07T14:51:06.7821547Z }
2025-07-07T14:51:06.7822015Z 
2025-07-07T14:51:06.7822664Z * Request to https://api.github.com/graphql
2025-07-07T14:51:06.7823845Z > POST /graphql HTTP/1.1
2025-07-07T14:51:06.7824851Z > Host: api.github.com
2025-07-07T14:51:06.7826525Z > Accept: application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview
2025-07-07T14:51:06.7828474Z > Authorization: token ████████████████████
2025-07-07T14:51:06.7829611Z > Content-Length: 281
2025-07-07T14:51:06.7830618Z > Content-Type: application/json
2025-07-07T14:51:06.7831710Z > Graphql-Features: merge_queue
2025-07-07T14:51:06.7832731Z > Time-Zone: /UTC
2025-07-07T14:51:06.7833675Z > User-Agent: GitHub CLI 2.74.2
2025-07-07T14:51:06.7834310Z 
2025-07-07T14:51:06.7834918Z * Request at 2025-07-07 14:51:06.767966758 +0000 UTC m=+0.554568055
2025-07-07T14:51:06.7836281Z * Request to https://api.github.com/graphql
2025-07-07T14:51:06.7837516Z > POST /graphql HTTP/1.1
2025-07-07T14:51:06.7838718Z > Host: api.github.com
2025-07-07T14:51:06.7840404Z > Accept: application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview
2025-07-07T14:51:06.7842288Z > Authorization: token ████████████████████
2025-07-07T14:51:06.7843401Z > Content-Length: 391
2025-07-07T14:51:06.7844407Z > Content-Type: application/json
2025-07-07T14:51:06.7845508Z > Graphql-Features: merge_queue
2025-07-07T14:51:06.7846531Z > Time-Zone: /UTC
2025-07-07T14:51:06.7847538Z > User-Agent: GitHub CLI 2.74.2
2025-07-07T14:51:06.7848388Z 
2025-07-07T14:51:06.7848857Z GraphQL query:
2025-07-07T14:51:06.7852719Z query RepositoryAssignableActors($endCursor:String$name:String!$owner:String!){repository(owner: $owner, name: $name){suggestedActors(first: 100, after: $endCursor, capabilities: CAN_BE_ASSIGNED){nodes{... on User{id,login,name,__typename},... on Bot{id,login,__typename}},pageInfo{hasNextPage,endCursor}}}}
2025-07-07T14:51:06.7857107Z GraphQL variables: {"endCursor":null,"name":"{repo}","owner":"{org}"}
2025-07-07T14:51:06.7858404Z 
2025-07-07T14:51:06.7858888Z GraphQL query:
2025-07-07T14:51:06.7861931Z query OrganizationTeamList($endCursor:String$owner:String!){organization(login: $owner){teams(first: 100, orderBy: {field: NAME, direction: ASC}, after: $endCursor){nodes{id,slug},pageInfo{hasNextPage,endCursor}}}}
2025-07-07T14:51:06.7865097Z GraphQL variables: {"endCursor":null,"owner":"{org}"}
2025-07-07T14:51:06.7866016Z 
2025-07-07T14:51:06.9063547Z < HTTP/2.0 200 OK
2025-07-07T14:51:06.9065140Z < Access-Control-Allow-Origin: *
2025-07-07T14:51:06.9070071Z < Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
2025-07-07T14:51:06.9074547Z < Content-Security-Policy: default-src 'none'
2025-07-07T14:51:06.9075884Z < Content-Type: application/json; charset=utf-8
2025-07-07T14:51:06.9077097Z < Date: Mon, 07 Jul 2025 14:51:06 GMT
2025-07-07T14:51:06.9079070Z < Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
2025-07-07T14:51:06.9080646Z < Server: github.com
2025-07-07T14:51:06.9082004Z < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
2025-07-07T14:51:06.9083621Z < Vary: Accept-Encoding, Accept, X-Requested-With
2025-07-07T14:51:06.9084888Z < X-Accepted-Oauth-Scopes: repo
2025-07-07T14:51:06.9085999Z < X-Content-Type-Options: nosniff
2025-07-07T14:51:06.9087101Z < X-Frame-Options: deny
2025-07-07T14:51:06.9088714Z < X-Github-Media-Type: github.v4; param=merge-info-preview.nebula-preview; format=json
2025-07-07T14:51:06.9090514Z < X-Github-Request-Id: BA41:18A266:F3C24:1E8363:686BDEDA
2025-07-07T14:51:06.9091888Z < X-Oauth-Scopes: read:discussion, read:org, repo
2025-07-07T14:51:06.9093106Z < X-Ratelimit-Limit: 5000
2025-07-07T14:51:06.9094156Z < X-Ratelimit-Remaining: 4990
2025-07-07T14:51:06.9095229Z < X-Ratelimit-Reset: 1751903432
2025-07-07T14:51:06.9096307Z < X-Ratelimit-Resource: graphql
2025-07-07T14:51:06.9097376Z < X-Ratelimit-Used: 10
2025-07-07T14:51:06.9098358Z < X-Xss-Protection: 0
2025-07-07T14:51:06.9098926Z 
2025-07-07T14:51:06.9099295Z {
2025-07-07T14:51:06.9100094Z   "data": {
2025-07-07T14:51:06.9100942Z     "viewer": {
2025-07-07T14:51:06.9101830Z       "login": "{bot}"
2025-07-07T14:51:06.9102768Z     }
2025-07-07T14:51:06.9103565Z   }
2025-07-07T14:51:06.9104346Z }
2025-07-07T14:51:06.9104780Z 
2025-07-07T14:51:06.9105197Z * Request took 138.429272ms
2025-07-07T14:51:07.1390241Z < HTTP/2.0 200 OK
2025-07-07T14:51:07.1391615Z < Access-Control-Allow-Origin: *
2025-07-07T14:51:07.1397133Z < Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
2025-07-07T14:51:07.1401746Z < Content-Security-Policy: default-src 'none'
2025-07-07T14:51:07.1403128Z < Content-Type: application/json; charset=utf-8
2025-07-07T14:51:07.1404373Z < Date: Mon, 07 Jul 2025 14:51:07 GMT
2025-07-07T14:51:07.1405916Z < Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
2025-07-07T14:51:07.1407470Z < Server: github.com
2025-07-07T14:51:07.1408980Z < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
2025-07-07T14:51:07.1410999Z < Vary: Accept-Encoding, Accept, X-Requested-With
2025-07-07T14:51:07.1412261Z < X-Accepted-Oauth-Scopes: repo
2025-07-07T14:51:07.1413370Z < X-Content-Type-Options: nosniff
2025-07-07T14:51:07.1414453Z < X-Frame-Options: deny
2025-07-07T14:51:07.1415960Z < X-Github-Media-Type: github.v4; param=merge-info-preview.nebula-preview; format=json
2025-07-07T14:51:07.1417750Z < X-Github-Request-Id: BA41:18A266:F3C24:1E8366:686BDEDA
2025-07-07T14:51:07.1419119Z < X-Oauth-Scopes: read:discussion, read:org, repo
2025-07-07T14:51:07.1420337Z < X-Ratelimit-Limit: 5000
2025-07-07T14:51:07.1421646Z < X-Ratelimit-Remaining: 4989
2025-07-07T14:51:07.1422728Z < X-Ratelimit-Reset: 1751903432
2025-07-07T14:51:07.1423789Z < X-Ratelimit-Resource: graphql
2025-07-07T14:51:07.1424844Z < X-Ratelimit-Used: 11
2025-07-07T14:51:07.1425805Z < X-Xss-Protection: 0
2025-07-07T14:51:07.1426358Z 
2025-07-07T14:51:07.1426916Z {
2025-07-07T14:51:07.1427721Z   "data": {
2025-07-07T14:51:07.1428561Z     "repository": {
2025-07-07T14:51:07.1429513Z       "suggestedActors": {
2025-07-07T14:51:07.1430496Z         "nodes": [
2025-07-07T14:51:07.1431360Z           {users}
2025-07-07T14:51:07.2112498Z         ],
2025-07-07T14:51:07.2113320Z         "pageInfo": {
2025-07-07T14:51:07.2114262Z           "hasNextPage": true,
2025-07-07T14:51:07.2115294Z           "endCursor": "MTAw"
2025-07-07T14:51:07.2116241Z         }
2025-07-07T14:51:07.2117037Z       }
2025-07-07T14:51:07.2117815Z     }
2025-07-07T14:51:07.2118614Z   }
2025-07-07T14:51:07.2119392Z }
2025-07-07T14:51:07.2119815Z 
2025-07-07T14:51:07.2120211Z * Request took 372.22261ms
2025-07-07T14:51:07.2121372Z * Request at 2025-07-07 14:51:07.141844565 +0000 UTC m=+0.928445882
2025-07-07T14:51:07.2122724Z * Request to https://api.github.com/graphql
2025-07-07T14:51:07.2123855Z > POST /graphql HTTP/1.1
2025-07-07T14:51:07.2124824Z > Host: api.github.com
2025-07-07T14:51:07.2126426Z > Accept: application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview
2025-07-07T14:51:07.2128510Z > Authorization: token ████████████████████
2025-07-07T14:51:07.2129616Z > Content-Length: 394
2025-07-07T14:51:07.2130591Z > Content-Type: application/json
2025-07-07T14:51:07.2131669Z > Graphql-Features: merge_queue
2025-07-07T14:51:07.2132665Z > Time-Zone: /UTC
2025-07-07T14:51:07.2133596Z > User-Agent: GitHub CLI 2.74.2
2025-07-07T14:51:07.2134233Z 
2025-07-07T14:51:07.2134609Z GraphQL query:
2025-07-07T14:51:07.2138300Z query RepositoryAssignableActors($endCursor:String!$name:String!$owner:String!){repository(owner: $owner, name: $name){suggestedActors(first: 100, after: $endCursor, capabilities: CAN_BE_ASSIGNED){nodes{... on User{id,login,name,__typename},... on Bot{id,login,__typename}},pageInfo{hasNextPage,endCursor}}}}
2025-07-07T14:51:07.2142502Z GraphQL variables: {"endCursor":"MTAw","name":"{repo}","owner":"{org}"}
2025-07-07T14:51:07.2143561Z 
2025-07-07T14:51:07.2958122Z < HTTP/2.0 200 OK
2025-07-07T14:51:07.2959557Z < Access-Control-Allow-Origin: *
2025-07-07T14:51:07.2965050Z < Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
2025-07-07T14:51:07.2970540Z < Content-Security-Policy: default-src 'none'
2025-07-07T14:51:07.2971813Z < Content-Type: application/json; charset=utf-8
2025-07-07T14:51:07.2973005Z < Date: Mon, 07 Jul 2025 14:51:07 GMT
2025-07-07T14:51:07.2974505Z < Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
2025-07-07T14:51:07.2976027Z < Server: github.com
2025-07-07T14:51:07.2977357Z < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
2025-07-07T14:51:07.2978948Z < Vary: Accept-Encoding, Accept, X-Requested-With
2025-07-07T14:51:07.2980178Z < X-Accepted-Oauth-Scopes: repo
2025-07-07T14:51:07.2981254Z < X-Content-Type-Options: nosniff
2025-07-07T14:51:07.2982323Z < X-Frame-Options: deny
2025-07-07T14:51:07.2983841Z < X-Github-Media-Type: github.v4; param=merge-info-preview.nebula-preview; format=json
2025-07-07T14:51:07.2986234Z < X-Github-Request-Id: BA41:18A266:F3C24:1E8364:686BDEDA
2025-07-07T14:51:07.2988047Z < X-Oauth-Scopes: read:discussion, read:org, repo
2025-07-07T14:51:07.2989909Z < X-Ratelimit-Limit: 5000
2025-07-07T14:51:07.2991277Z < X-Ratelimit-Remaining: 4988
2025-07-07T14:51:07.2992671Z < X-Ratelimit-Reset: 1751903432
2025-07-07T14:51:07.2994076Z < X-Ratelimit-Resource: graphql
2025-07-07T14:51:07.2995461Z < X-Ratelimit-Used: 12
2025-07-07T14:51:07.2996728Z < X-Xss-Protection: 0
2025-07-07T14:51:07.2997452Z 
2025-07-07T14:51:07.2997979Z {
2025-07-07T14:51:07.2998770Z   "data": {
2025-07-07T14:51:07.2999609Z     "organization": {
2025-07-07T14:51:07.3000513Z       "teams": {
2025-07-07T14:51:07.3001367Z         "nodes": [
2025-07-07T14:51:07.3002217Z           {redacted}
2025-07-07T14:51:07.3257634Z         ],
2025-07-07T14:51:07.3258467Z         "pageInfo": {
2025-07-07T14:51:07.3259409Z           "hasNextPage": false,
2025-07-07T14:51:07.3261402Z           "endCursor": "Y3Vyc29yOnYyOpQCq1dlYiBDaGFwdGVyq1dlYiBDaGFwdGVyzgB2voM="
2025-07-07T14:51:07.3263541Z         }
2025-07-07T14:51:07.3264656Z       }
2025-07-07T14:51:07.3265733Z     }
2025-07-07T14:51:07.3266800Z   }
2025-07-07T14:51:07.3267833Z }
2025-07-07T14:51:07.3268420Z 
2025-07-07T14:51:07.3268964Z * Request took 528.512977ms
2025-07-07T14:51:07.4320902Z < HTTP/2.0 200 OK
2025-07-07T14:51:07.4322174Z < Access-Control-Allow-Origin: *
2025-07-07T14:51:07.4327077Z < Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
2025-07-07T14:51:07.4331553Z < Content-Security-Policy: default-src 'none'
2025-07-07T14:51:07.4332820Z < Content-Type: application/json; charset=utf-8
2025-07-07T14:51:07.4334010Z < Date: Mon, 07 Jul 2025 14:51:07 GMT
2025-07-07T14:51:07.4335514Z < Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
2025-07-07T14:51:07.4337109Z < Server: github.com
2025-07-07T14:51:07.4338677Z < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
2025-07-07T14:51:07.4340265Z < Vary: Accept-Encoding, Accept, X-Requested-With
2025-07-07T14:51:07.4341499Z < X-Accepted-Oauth-Scopes: repo
2025-07-07T14:51:07.4342591Z < X-Content-Type-Options: nosniff
2025-07-07T14:51:07.4343647Z < X-Frame-Options: deny
2025-07-07T14:51:07.4345123Z < X-Github-Media-Type: github.v4; param=merge-info-preview.nebula-preview; format=json
2025-07-07T14:51:07.4346882Z < X-Github-Request-Id: BA41:18A266:F3E5F:1E87BE:686BDEDB
2025-07-07T14:51:07.4348222Z < X-Oauth-Scopes: read:discussion, read:org, repo
2025-07-07T14:51:07.4349428Z < X-Ratelimit-Limit: 5000
2025-07-07T14:51:07.4350451Z < X-Ratelimit-Remaining: 4987
2025-07-07T14:51:07.4351497Z < X-Ratelimit-Reset: 1751903432
2025-07-07T14:51:07.4352547Z < X-Ratelimit-Resource: graphql
2025-07-07T14:51:07.4353573Z < X-Ratelimit-Used: 13
2025-07-07T14:51:07.4354924Z < X-Xss-Protection: 0
2025-07-07T14:51:07.4355482Z 
2025-07-07T14:51:07.4356110Z {
2025-07-07T14:51:07.4356885Z   "data": {
2025-07-07T14:51:07.4357725Z     "repository": {
2025-07-07T14:51:07.4358651Z       "suggestedActors": {
2025-07-07T14:51:07.4359607Z         "nodes": [
2025-07-07T14:51:07.4360454Z           {redacted}
2025-07-07T14:51:07.4789098Z         ],
2025-07-07T14:51:07.4790535Z         "pageInfo": {
2025-07-07T14:51:07.4791863Z           "hasNextPage": false,
2025-07-07T14:51:07.4793252Z           "endCursor": "MTU5"
2025-07-07T14:51:07.4794409Z         }
2025-07-07T14:51:07.4795210Z       }
2025-07-07T14:51:07.4795994Z     }
2025-07-07T14:51:07.4796765Z   }
2025-07-07T14:51:07.4797533Z }
2025-07-07T14:51:07.4797955Z 
2025-07-07T14:51:07.4798374Z * Request took 291.796127ms
2025-07-07T14:51:07.4799529Z * Request at 2025-07-07 14:51:07.434747443 +0000 UTC m=+1.221348750
2025-07-07T14:51:07.4800869Z * Request to https://api.github.com/graphql
2025-07-07T14:51:07.4801995Z > POST /graphql HTTP/1.1
2025-07-07T14:51:07.4802953Z > Host: api.github.com
2025-07-07T14:51:07.4804561Z > Accept: application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview
2025-07-07T14:51:07.4806445Z > Authorization: token ████████████████████
2025-07-07T14:51:07.4807532Z > Content-Length: 179
2025-07-07T14:51:07.4808604Z > Content-Type: application/json
2025-07-07T14:51:07.4809995Z > Graphql-Features: merge_queue
2025-07-07T14:51:07.4811179Z > Time-Zone: /UTC
2025-07-07T14:51:07.4812103Z > User-Agent: GitHub CLI 2.74.2
2025-07-07T14:51:07.4812722Z 
2025-07-07T14:51:07.4813098Z GraphQL query:
2025-07-07T14:51:07.4814800Z mutation PullRequestUpdate($input:UpdatePullRequestInput!){updatePullRequest(input: $input){__typename}}
2025-07-07T14:51:07.4816962Z GraphQL variables: {"input":{"pullRequestId":"PR_kwDOCr4UZs6dxvrG"}}
2025-07-07T14:51:07.4817934Z 
2025-07-07T14:51:07.8362462Z < HTTP/2.0 200 OK
2025-07-07T14:51:07.8363956Z < Access-Control-Allow-Origin: *
2025-07-07T14:51:07.8369803Z < Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
2025-07-07T14:51:07.8374238Z < Content-Security-Policy: default-src 'none'
2025-07-07T14:51:07.8375564Z < Content-Type: application/json; charset=utf-8
2025-07-07T14:51:07.8376751Z < Date: Mon, 07 Jul 2025 14:51:07 GMT
2025-07-07T14:51:07.8378263Z < Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
2025-07-07T14:51:07.8379769Z < Server: github.com
2025-07-07T14:51:07.8381075Z < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
2025-07-07T14:51:07.8382647Z < Vary: Accept-Encoding, Accept, X-Requested-With
2025-07-07T14:51:07.8383861Z < X-Accepted-Oauth-Scopes: repo
2025-07-07T14:51:07.8384940Z < X-Content-Type-Options: nosniff
2025-07-07T14:51:07.8385995Z < X-Frame-Options: deny
2025-07-07T14:51:07.8387511Z < X-Github-Media-Type: github.v4; param=merge-info-preview.nebula-preview; format=json
2025-07-07T14:51:07.8389268Z < X-Github-Request-Id: BA41:18A266:F3FD4:1E8AB4:686BDEDB
2025-07-07T14:51:07.8390608Z < X-Oauth-Scopes: read:discussion, read:org, repo
2025-07-07T14:51:07.8391784Z < X-Ratelimit-Limit: 5000
2025-07-07T14:51:07.8392796Z < X-Ratelimit-Remaining: 4986
2025-07-07T14:51:07.8393842Z < X-Ratelimit-Reset: 1751903432
2025-07-07T14:51:07.8394872Z < X-Ratelimit-Resource: graphql
2025-07-07T14:51:07.8396071Z < X-Ratelimit-Used: 14
2025-07-07T14:51:07.8397038Z < X-Xss-Protection: 0
2025-07-07T14:51:07.8397595Z 
2025-07-07T14:51:07.8397950Z {
2025-07-07T14:51:07.8398736Z   "data": {
2025-07-07T14:51:07.8399587Z     "updatePullRequest": {
2025-07-07T14:51:07.8400668Z       "__typename": "UpdatePullRequestPayload"
2025-07-07T14:51:07.8401757Z     }
2025-07-07T14:51:07.8402525Z   }
2025-07-07T14:51:07.8403289Z }
2025-07-07T14:51:07.8403702Z 
2025-07-07T14:51:07.8404111Z * Request took 401.490227ms
2025-07-07T14:51:07.8405070Z '' not found
2025-07-07T14:51:07.8417599Z ##[error]Process completed with exit code 1.

Possible Cause

I suspect it's caused by line 57 in the logs where it returns a bot (probably Copilot) in the review requests.

2025-07-07T14:51:06.6772989Z         "reviewRequests": {
2025-07-07T14:51:06.6774396Z           "nodes": [
2025-07-07T14:51:06.6775462Z             {
2025-07-07T14:51:06.6776405Z               "requestedReviewer": {
2025-07-07T14:51:06.6777527Z                 "__typename": "Bot"
2025-07-07T14:51:06.6778590Z               }
2025-07-07T14:51:06.6779480Z             },

That reviewer is only present for a brief period between the pr being opened and Copilot completing it's review. That would explain why rerunning the workflow succeeds, it's run after the bot is removed from the list from review requests.

It seems to be caused by LoginOrSlug returning an empty string when it's called for a bot reviewer.

cli/api/queries_pr.go

Lines 315 to 320 in df5e6d9

func (r RequestedReviewer) LoginOrSlug() string {
if r.TypeName == teamTypeName {
return fmt.Sprintf("%s/%s", r.Organization.Login, r.Slug)
}
return r.Login
}

Which appears to be called by the pr edit command

editable.Reviewers.Default = pr.ReviewRequests.Logins()

The empty string is used in updatePullRequestReviews which calls ReviewerIds

cli/pkg/cmd/pr/edit/edit.go

Lines 336 to 337 in df5e6d9

func updatePullRequestReviews(httpClient *http.Client, repo ghrepo.Interface, id string, editable shared.Editable) error {
userIds, teamIds, err := editable.ReviewerIds()

which calls MembersToIDs

userIds, err := e.Metadata.MembersToIDs(userReviewers)

which would produce the error if assigneeLogin is an empty string.

return nil, fmt.Errorf("'%s' not found", assigneeLogin)

Side note

Ideally the error messages would be more unique. There's currently 6 error messages with the format '%s' not found in the same file. In this case where the argument is empty, the error message gave no hint about what type could not be found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-prrelating to the gh pr commandmore-info-neededMore info needed from user/contributorpriority-3Affects a small number of users or is largely cosmetic

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions