{"repo":"xt0rted/pull-request-comment-branch","free":true,"listed":false,"github":"https://github.com/xt0rted/pull-request-comment-branch","clone":"git clone https://github.com/xt0rted/pull-request-comment-branch.git","description":"A GitHub Action to get the head ref and sha of a pull request comment","language":"TypeScript","stars":98,"topics":["github-actions","workflows","pull-requests","comments","hacktoberfest"],"license":"MIT","category":"workflow-automation","readme_excerpt":"Pull Request Comment Branch Get the head ref and sha of a pull request comment. Workflows for pull request comments are triggered using the issue comment event which runs for both issues and pull requests. This action lets you filter your workflow to comments only on pull requests. It also gets the head ref and sha for the pull request branch which can be used later in the workflow. The pull request head ref and sha are important because issue comment workflows run against the repository's default branch (usually main or master ) and not the pull request's branch. With this action you'll be able to pass the ref to actions/checkout and work with the pull request's code. Usage Token Permissions If your repository is using token permissions you'll need to set contents: read , issues: read and pull-request: read on either the workflow or the job. Workflow Config Job Config Options Required Name Allowed values Description -- -- -- repo token GITHUB TOKEN (default) or PAT GITHUB TOKEN token or a repo scoped PAT. Outputs Name Decription -- -- base ref The name of the branch the pull request will merge into. base sha The head sha of the branch the pull request will merge into. head ref The name of the pull request branch the comment belongs to. head sha The head sha of the pull request branch the comment belongs to. License The scripts and documentation in this project are released under the MIT License","default_branch":null,"files":null,"tree":[],"storefront":"/r/xt0rted","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/xt0rted/pull-request-comment-branch/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}