Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

approval labeler rewrite #292

Merged
merged 5 commits into from
Mar 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"