mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-10 07:37:57 +00:00
[CI] Require D*-audit labels for any runtime changes (#2617)
* update generate_release_text.rb * add checks for audit labels for runtime changes * fix check_labels.sh * use has_runtime_changes in check_runtime.sh * add D1-trivial label * fix check_labels.sh
This commit is contained in:
@@ -22,6 +22,7 @@ releasenotes_labels=(
|
||||
'B7-runtimenoteworthy'
|
||||
)
|
||||
|
||||
# Must be an ordered list of priorities, lowest first
|
||||
priority_labels=(
|
||||
'C1-low 📌'
|
||||
'C3-medium 📣'
|
||||
@@ -29,6 +30,13 @@ priority_labels=(
|
||||
'C9-critical ‼️'
|
||||
)
|
||||
|
||||
audit_labels=(
|
||||
'D1-trivial'
|
||||
'D1-audited👍'
|
||||
'D5-nicetohaveaudit⚠️ '
|
||||
'D9-needsaudit👮'
|
||||
)
|
||||
|
||||
echo "[+] Checking release notes (B) labels for $CI_COMMIT_BRANCH"
|
||||
if ensure_labels "${releasenotes_labels[@]}"; then
|
||||
echo "[+] Release notes label detected. All is well."
|
||||
@@ -45,10 +53,20 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If the priority is anything other than C1-low, we *must not* have a B0-silent
|
||||
if has_runtime_changes origin/master "${HEAD_SHA}"; then
|
||||
echo "[+] Runtime changes detected. Checking audit (D) labels"
|
||||
if ensure_labels "${audit_labels[@]}"; then
|
||||
echo "[+] Release audit label detected. All is well."
|
||||
else
|
||||
echo "[!] Release audit label not detected. Please add one of: ${audit_labels[*]}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# If the priority is anything other than the lowest, we *must not* have a B0-silent
|
||||
# label
|
||||
if has_label "$repo" "$CI_COMMIT_BRANCH" 'B0-silent' &&
|
||||
! has_label "$repo" "$CI_COMMIT_BRANCH" 'C1-low' ; then
|
||||
if has_label "$repo" "$GITHUB_PR" 'B0-silent' &&
|
||||
! has_label "$repo" "$GITHUB_PR" "${priority_labels[0]}"; then
|
||||
echo "[!] Changes with a priority higher than C1-low *MUST* have a B- label that is not B0-Silent"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user