Github Actions Get Pull Request Number at genvadablog Blog


Github Actions Get Pull Request Number. I don’t see how to. In this example, we are using the github_event_pull_request_number environment variable to access the pull request.

Understanding the GitHub Pull Request Workflow
Understanding the GitHub Pull Request Workflow from blog.mergify.com

I’ve found github_sha and github_ref in the environment variables. This action sends a request to github to find the pr associated with the current sha, and returns its number in the number output. To get the branch name from which the pull request originated, you can use github.head_ref in your workflow.

Understanding the GitHub Pull Request Workflow

I’d like to get the commit sha, branch, and pull request number on a push event. In this example, we are using the github_event_pull_request_number environment variable to access the pull request. This guide covers the fundamental aspects of the github pull request workflow, including how to set up and use github actions to automate checks. I’d like to get the commit sha, branch, and pull request number on a push event.