From 37f8d4ed075f9769fff91f2c654fe46207f47a9b Mon Sep 17 00:00:00 2001 From: Florent Date: Fri, 7 May 2021 14:46:08 -0400 Subject: [PATCH 1/2] build: add verification workflow --- .github/workflows/verification.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/verification.yml diff --git a/.github/workflows/verification.yml b/.github/workflows/verification.yml new file mode 100644 index 0000000..045e369 --- /dev/null +++ b/.github/workflows/verification.yml @@ -0,0 +1,18 @@ +name: Verification check +on: + pull_request: + types: [opened, labeled, unlabeled, edited, synchronize] +jobs: + label: + runs-on: ubuntu-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJSON(github) }} + run: echo "$GITHUB_CONTEXT" + - uses: mheap/github-action-required-labels@v1 + if: ${{ startsWith(github.event.pull_request.title, 'feat:') && contains( github.event.pull_request.labels.*.name, 'new component') }} + with: + mode: exactly + count: 2 + labels: 'new component, verified' From d2aa1ae007dcf39385a9bf9c093017b621b78d23 Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 10 May 2021 14:54:50 -0400 Subject: [PATCH 2/2] refactor: require verification unless `skip verification` label applied --- .github/workflows/verification.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/verification.yml b/.github/workflows/verification.yml index 045e369..1991ba2 100644 --- a/.github/workflows/verification.yml +++ b/.github/workflows/verification.yml @@ -11,8 +11,8 @@ jobs: GITHUB_CONTEXT: ${{ toJSON(github) }} run: echo "$GITHUB_CONTEXT" - uses: mheap/github-action-required-labels@v1 - if: ${{ startsWith(github.event.pull_request.title, 'feat:') && contains( github.event.pull_request.labels.*.name, 'new component') }} + if: ${{ startsWith(github.event.pull_request.title, 'feat:') && !contains( github.event.pull_request.labels.*.name, 'skip verification') }} with: mode: exactly - count: 2 - labels: 'new component, verified' + count: 1 + labels: 'verified'