Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pullreminders/label-when-approved-action
GitHub Action that labels approved pull requests
https://github.com/pullreminders/label-when-approved-action
Last synced: about 2 months ago
JSON representation
GitHub Action that labels approved pull requests
- Host: GitHub
- URL: https://github.com/pullreminders/label-when-approved-action
- Owner: abinoda
- License: mit
- Created: 2019-01-31T16:47:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-06T16:39:56.000Z (11 months ago)
- Last Synced: 2024-10-30T07:47:34.384Z (3 months ago)
- Language: Shell
- Homepage:
- Size: 250 KB
- Stars: 191
- Watchers: 1
- Forks: 130
- Open Issues: 62
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-actions - Label PR once it has a Specified Number of Approvals
- awesome-actions - Label PR once it has a Specified Number of Approvals
- awesome-workflows - Label PR once it has a Specified Number of Approvals
README
# Label approved pull requests
This GitHub Action applies a label of your choice to pull requests that reach a specified number of approvals. For teams using [Pull Reminders](https://pullreminders.com), this action can be used to exclude approved pull requests from reminders.
## Usage
This Action subscribes to [Pull request review events](https://developer.github.com/v3/activity/events/types/#pullrequestreviewevent) which fire whenever pull requests are approved. The action requires two environment variables – the label name to add and the number of required approvals. Optionally you can provide a label name to remove.
```workflow
on: pull_request_review
name: Label approved pull requests
jobs:
labelWhenApproved:
name: Label when approved
runs-on: ubuntu-latest
steps:
- name: Label when approved
uses: pullreminders/label-when-approved-action@master
env:
APPROVALS: "2"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADD_LABEL: "approved"
REMOVE_LABEL: "awaiting%20review"
```## Demo
## License
The Dockerfile and associated scripts and documentation in this project are released under the [MIT License](LICENSE).