From 97d0ac805756d0c5ad75821673c3156fd314a811 Mon Sep 17 00:00:00 2001 From: haerdib Date: Tue, 21 Nov 2023 10:18:58 +0100 Subject: [PATCH] update ci --- .github/release-drafter.yml | 2 ++ .github/workflows/check-lables.yml | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index a7b7067a8..d732a4b91 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -8,10 +8,12 @@ categories: - 'E2-breaksapi' - title: ' 🌈 Features' labels: + - 'F6-optimization' - 'F8-newfeature' - 'F7-enhancement' - title: '🐛 Bug Fixes' labels: + - 'F1-security' - 'F2-bug' - title: ' Miscellaneous ' collapse-after: 5 diff --git a/.github/workflows/check-lables.yml b/.github/workflows/check-lables.yml index d4140c237..94f558d42 100644 --- a/.github/workflows/check-lables.yml +++ b/.github/workflows/check-lables.yml @@ -21,3 +21,13 @@ jobs: if [[ "$MATCH" == '[]' ]]; then exit 1 fi + - name: F Label check + env: + enforced_labels: "F0-miscellaneous,F1-security,F2-bug,F3-test,F4-documentation,F5-refactor,F6-optimization,F7-enhancement,F8-newfeature,F9-dependencies" + run: | + MATCH=$(jq -cn '${{ toJSON(github.event.pull_request.labels.*.name) }} as $USER_LABELS | + ${{ toJSON(env.enforced_labels) }} | split(",") as $LABELS | + $USER_LABELS - ($USER_LABELS - $LABELS)') + if [[ "$MATCH" == '[]' ]]; then + exit 1 + fi