From 8cad9a6f15169065306ad86872999b721914a2c2 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Sun, 23 Jul 2023 11:40:04 +0200 Subject: [PATCH] skip_changelog: Prefix role label triggers. Add the prefix `roles/` to the per-role label names in order to namespace them from other labels. Signed-off-by: SuperQ --- .github/workflows/ansible-ci.yml | 2 +- .github/workflows/conventional-label.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ansible-ci.yml b/.github/workflows/ansible-ci.yml index 14aad912..26f452d1 100644 --- a/.github/workflows/ansible-ci.yml +++ b/.github/workflows/ansible-ci.yml @@ -69,7 +69,7 @@ jobs: env: LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }} run: | - roles=$(echo $LABELS | jq -r '.[]') + roles=$(echo $LABELS | jq -r '.[]' | grep '^roles/' | sed 's|^roles/||') echo tests="[`for role in $roles; do for test in $(find tests/integration/targets -maxdepth 1 -mindepth 1 -type d -iname "molecule-${role}-*" -printf "%f\n"); do echo '{"test":\"'"${test}"'\","name":\"'"${test#*-}\"'"}'; diff --git a/.github/workflows/conventional-label.yml b/.github/workflows/conventional-label.yml index fdcb5788..ba71a448 100644 --- a/.github/workflows/conventional-label.yml +++ b/.github/workflows/conventional-label.yml @@ -69,7 +69,7 @@ jobs: steps.changed-roles.outputs.all_changed_and_modified_files with: script: | - const labels = '${{ steps.changed-roles.outputs.all_changed_and_modified_files }}'.split(' '); + const labels = '${{ steps.changed-roles.outputs.all_changed_and_modified_files }}'.split(' ').map(i => 'roles/' + i); github.rest.issues.addLabels({ issue_number: context.issue.number, owner: context.repo.owner,