From 923f72f8f08c2dd0af2dada9b164b0caf8effb06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Thu, 4 Mar 2021 09:08:04 +0100 Subject: [PATCH] approval labeler rewrite (#292) * 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 --- .github/workflows/label_approval_count.yml | 24 +++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/label_approval_count.yml b/.github/workflows/label_approval_count.yml index fb0fd95273..6951683d43 100644 --- a/.github/workflows/label_approval_count.yml +++ b/.github/workflows/label_approval_count.yml @@ -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" \ No newline at end of file + REMOVE_LABEL: "Awaiting 1 approval"