Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
tag

GitHub Action

Label approved pull requests

v1.0.3

Label approved pull requests

tag

Label approved pull requests

Auto-label pull requests that have a specified number of approvals

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Label approved pull requests

uses: abinoda/[email protected]

Learn more about this action in abinoda/label-when-approved-action

Choose a version

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, this action can be used to exclude approved pull requests from reminders.

Usage

This Action subscribes to Pull request review events which fire whenever pull requests are approved. The action requires two environment variables – a label name and the number of required approvals.

workflow "Label approved pull requests" {
  on = "pull_request_review"
  resolves = ["Label when approved"]
}

action "Label when approved" {
  uses = "pullreminders/label-when-approved-action@master"
  secrets = ["GITHUB_TOKEN"]
  env = {
    LABEL_NAME = "approved"
    APPROVALS  = "2"
  }
}

Demo

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.