A GitHub action for reacting to an issue or pull request.
- name: Add reactions
uses: aidan-mundy/react-to-issue@v1.INSERT.VERSION
with:
issue-number: 9
reactions: +1, hooray, laugh
Name | Description | Default |
---|---|---|
token |
GITHUB_TOKEN (issues: write , pull-requests: write ) or a repo scoped PAT. |
GITHUB_TOKEN |
repository |
The full name of the repository (OWNER/REPO) to work in. | Current repository |
issue-number |
The number of the issue or pull request to react to. | |
reactions |
A comma separated list of reactions to add. (+1 , -1 , laugh , confused , heart , hooray , rocket , eyes ) |
Note: In public repositories this action does not work in pull_request
workflows when triggered by forks.
Any attempt will be met with the error, Resource not accessible by integration
.
This is due to token restrictions put in place by GitHub Actions. Private repositories can be configured to enable workflows from forks to run without restriction. See here for further explanation. Alternatively, use the pull_request_target
event to comment on pull requests.
You can react to issues and pull requests in another repository by using a PAT instead of GITHUB_TOKEN
.
The user associated with the PAT must have write access to the repository.
This code was originally sourced from https://github.com/peter-evans/create-or-update-comment subject to the MIT License under copyright of Peter Evans. Files sourced substantially from the original repository have been annotated as such (where possible).
I've repurposed the code for adding reactions to issues and pull requests, and I am releasing the code with the MIT license under which it was originally obtained.