Skip to content

Commit

Permalink
approval labeler rewrite (w3f#292)
Browse files Browse the repository at this point in the history
* Github action to label based on approvals (missing)

* Revert "Github action to label based on approvals (missing)"

This reverts commit f6a6b70eb17683ab80a5493734d2bd0f3ce18ae2.

* Github action to label based on approvals

* approval labeler rewrite
  • Loading branch information
semuelle authored Mar 4, 2021
1 parent 2bb3606 commit 923f72f
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/label_approval_count.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
on: pull_request_review
on:
pull_request_review:
types: [submitted]

name: Label pull request approvals

jobs:
labelWhen1Approved:
name: Label when one approved
name: Awaiting 2 approvals
runs-on: ubuntu-latest
steps:
- name: Label when one approved
- name: Two remaining
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
- name: One remaining
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:
REMOVE_LABEL: "ready for review"
- 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"
REMOVE_LABEL: "Awaiting 1 approval"

0 comments on commit 923f72f

Please sign in to comment.