You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I pass the action the default workflow GITHUB_TOKEN, checks don't run on the pull request because workflows can't trigger other workflows. This is expected and documented, and the workaround is to use a 'bot' account with a PAT that has access to the repository.
However, it seems that the changesets action is incompatible with PATs because of the way it makes queries. When I pass my PAT to the action, the action fails with:
HttpError: Query must include 'is:issue' or 'is:pull-request'
A look into the API documentation reveals that this is a known restriction:
Note: For user-to-server GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the is:issue or is:pull-request qualifier will receive an HTTP 422 Unprocessable Entity response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the is qualifier, see "Searching only issues or pull requests."
It seems that, when I use a PAT, the interaction is now considered a "user-to-server" request instead of a "server-to-server" request like the default GITHUB_TOKEN.
I think this is a pretty common setup as many users will want CI checks to run on the release PR, so I think the action should support this 'user-to-server' scenario. It seems like a simple solution would be to add is:pull-request to the query and solve this headache (though it remains to be seen if there are any other incompatibilities after this error).
The text was updated successfully, but these errors were encountered:
iansan5653
changed the title
HttpError: Query must include 'is:issue' or 'is:pull-request' when using a PAT instead of the default GITHUB_TOKENHttpError: Query must include 'is:issue' or 'is:pull-request' when using a use PAT instead of the default GITHUB_TOKENNov 1, 2022
iansan5653
changed the title
HttpError: Query must include 'is:issue' or 'is:pull-request' when using a use PAT instead of the default GITHUB_TOKENHttpError: Query must include 'is:issue' or 'is:pull-request' when using a user PAT instead of the default GITHUB_TOKENNov 1, 2022
When I pass the action the default workflow
GITHUB_TOKEN
, checks don't run on the pull request because workflows can't trigger other workflows. This is expected and documented, and the workaround is to use a 'bot' account with a PAT that has access to the repository.However, it seems that the
changesets
action is incompatible with PATs because of the way it makes queries. When I pass my PAT to the action, the action fails with:A look into the API documentation reveals that this is a known restriction:
It seems that, when I use a PAT, the interaction is now considered a "user-to-server" request instead of a "server-to-server" request like the default
GITHUB_TOKEN
.I think this is a pretty common setup as many users will want CI checks to run on the release PR, so I think the action should support this 'user-to-server' scenario. It seems like a simple solution would be to add
is:pull-request
to the query and solve this headache (though it remains to be seen if there are any other incompatibilities after this error).The text was updated successfully, but these errors were encountered: