Skip to content

Commit

Permalink
Github action to label based on approvals (missing)
Browse files Browse the repository at this point in the history
  • Loading branch information
semuelle committed Mar 2, 2021
1 parent 8896d31 commit f6a6b70
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/label_approvals_missing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on: pull_request_review
name: Label pull request approvals
jobs:
labelWhen1Approved:
name: Label when one approved
runs-on: ubuntu-latest
steps:
- name: Label when one approved
uses: pullreminders/label-when-approved-action@master
env:
APPROVALS: "1"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADD_LABEL: "Awaiting 2 approvals"
REMOVE_LABEL: "ready for review"
labelWhen2Approved:
name: Label when two approved
runs-on: ubuntu-latest
steps:
- name: Label when two approved
uses: pullreminders/label-when-approved-action@master
env:
APPROVALS: "2"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADD_LABEL: "Awaiting 1 approval"
REMOVE_LABEL: "Awaiting 2 approvals"
labelWhen3Approved:
name: Label when three approved
runs-on: ubuntu-latest
steps:
- name: Label when three approved
uses: pullreminders/label-when-approved-action@master
env:
APPROVALS: "3"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADD_LABEL: "Approved 🚀"
REMOVE_LABEL: "Awaiting 2 approvals"

0 comments on commit f6a6b70

Please sign in to comment.