Fix #889: add missing repo info and fix wrong argument to gh #890
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.
gh pr view
can take the PR info in a number of ways, but does not recognize the URLs produced by${{github.event.pull_request.url}}
as being a pull request URL. This reuslts in failures like the one in #889.This workflow was working before. Something must have changed – perhaps a version update to
gh
changed the behavior. In any case, one straightforward way to resolve it is to give it a PR number instead of a URL.If a PR number is given, though, then
gh
also needs to be told which repository the PR number refers to.gh
would normally get this info from the current repo where it's executing, but since for efficiency we skip doing a git check-out for that step, it needs to be told explicitly. A simple solution is to set the$GH_TOKEN
environment variable, whichgh
uses if it's defined.