Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions scripts/check-role-prefix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ MSG=$(head -n 1 "$TMP_MSG_FILE")
ROLE_COUNT=$(echo "$CHANGED_ROLES" | tr '|' '\n' | wc -l)

if [ "$ROLE_COUNT" -eq 1 ]; then
# shellcheck disable=SC1087
PATTERN="^[\[(]$CHANGED_ROLES[\])]"
# shellcheck disable=SC2016
ESCAPED_ROLE=$(printf '%s\n' "$CHANGED_ROLES" | sed 's/[]\.*^$()+?{|]/\\&/g')
PATTERN="^[[(]${ESCAPED_ROLE}[])]"
else
PATTERN="^[\[(](multiple)[\])]"
PATTERN="^[[(](multiple)[])]"
fi

if ! grep -qE "$PATTERN" <<<"$MSG"; then
Expand Down
1 change: 1 addition & 0 deletions zuul.d/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
- .pre-commit-config.yaml
- .readthedocs.yaml
- .spellcheck.yml
- scripts/check-role-prefix.sh
- roles/dlrn_report
- roles/dlrn_promote
- roles/devscripts
Expand Down
2 changes: 2 additions & 0 deletions zuul.d/project-templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
requires:
- cifmw-pod-pre-commit
- cifmw-molecule
irrelevant-files:
- scripts/check-role-prefix.sh
- podified-multinode-edpm-deployment-crc: *content_provider
- cifmw-crc-podified-edpm-baremetal: *content_provider
- podified-multinode-hci-deployment-crc: *content_provider
Expand Down