When I tested this, I originally used the GITHUB_REF environment variable that was passed in by default.
This was fine when a PR was opened or closed, but when merged the ref changed to refs/heads/master, which meant that we were not provided with the pull request number to be able to query the GitHub API.
Instead, this depends on passing in the issue number, which is essentially the pull request number (a pull request is a type of issue).
When I tested this, I originally used the
GITHUB_REF
environment variable that was passed in by default.This was fine when a PR was opened or closed, but when merged the ref changed to
refs/heads/master
, which meant that we were not provided with the pull request number to be able to query the GitHub API.Instead, this depends on passing in the issue number, which is essentially the pull request number (a pull request is a type of issue).