From ad4dbf3ca2636bcf26aad9ac0afcdc9e4ba347a1 Mon Sep 17 00:00:00 2001 From: Shenghang Tsai Date: Wed, 24 Mar 2021 12:29:29 +0800 Subject: [PATCH] Refine label check of PR (#4486) * refine * fix yml syntax * use pr.* * refine --- .github/workflows/pr.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a0e37f25b50..3503cc312c4 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -9,11 +9,11 @@ jobs: runs-on: ubuntu-18.04 name: Labels steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Check labels - uses: OneFlow-Inc/verify-pr-label-action@master - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - required-type-labels: 'bug, enhancement, purge, feature, documentation' - required-component-labels: 'op, system, eager, build, xla, python, ci, test, tooling, onnx' + - name: Check type labels 'bug, enhancement, purge, feature, documentation' + if: (contains(github.event.pull_request.labels.*.name, 'bug') || contains(github.event.pull_request.labels.*.name, 'enhancement') || contains(github.event.pull_request.labels.*.name, 'purge') || contains(github.event.pull_request.labels.*.name, 'feature') || contains(github.event.pull_request.labels.*.name, 'documentation')) == false + run: | + exit 1 + - name: Check component labels 'op, system, eager, build, xla, python, ci, test, tooling, onnx' + if: (contains(github.event.pull_request.labels.*.name, 'op') || contains(github.event.pull_request.labels.*.name, 'system') || contains(github.event.pull_request.labels.*.name, 'eager') || contains(github.event.pull_request.labels.*.name, 'build') || contains(github.event.pull_request.labels.*.name, 'xla') || contains(github.event.pull_request.labels.*.name, 'python') || contains(github.event.pull_request.labels.*.name, 'ci') || contains(github.event.pull_request.labels.*.name, 'test') || contains(github.event.pull_request.labels.*.name, 'tooling') || contains(github.event.pull_request.labels.*.name, 'onnx')) == false + run: | + exit 2