From a6b762b1908dbda87e206297cd662a9e11e1659e Mon Sep 17 00:00:00 2001 From: Quan Tian Date: Wed, 24 May 2023 11:37:26 +0800 Subject: [PATCH] Add a workflow to check required labels To facilitate generating release note and backporting, all PRs should be labelled properly with the following up actions. However, PRs are merged without any label in some cases. The workflow checks there is at least one action label is added before a PR can be merged to remind that. If there is no required action, "action/none" should be labelled explicitly. Signed-off-by: Quan Tian --- .github/workflows/label.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/label.yml diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 00000000000..b6f26abe791 --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,14 @@ +name: Pull Request Labels +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: mheap/github-action-required-labels@v4 + with: + mode: minimum + count: 1 + labels: "action/backport, action/release-note, action/none" + add_comment: true