mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 13:31:04 +00:00
Fix up CI for new labels (#2673)
* Fix up CI/CD for the new labels. * Fix labels
This commit is contained in:
@@ -23,10 +23,10 @@ releasenotes_labels=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
priority_labels=(
|
priority_labels=(
|
||||||
'C1-low'
|
'C1-low 📌'
|
||||||
'C3-medium'
|
'C3-medium 📣'
|
||||||
'C7-high'
|
'C7-high ❗️'
|
||||||
'C9-critical'
|
'C9-critical ‼️'
|
||||||
)
|
)
|
||||||
|
|
||||||
echo "[+] Checking release notes (B) labels for $CI_COMMIT_BRANCH"
|
echo "[+] Checking release notes (B) labels for $CI_COMMIT_BRANCH"
|
||||||
|
|||||||
@@ -66,19 +66,27 @@ runtime_changes = Changelog.changes_with_label(all_changes, 'B7-runtimenoteworth
|
|||||||
|
|
||||||
# Add the audit status for runtime changes
|
# Add the audit status for runtime changes
|
||||||
runtime_changes.each do |c|
|
runtime_changes.each do |c|
|
||||||
if c.labels.any? { |l| l[:name] == 'D1-audited👍' }
|
if c.labels.any? { |l| l[:name] == 'D1-audited 👍' }
|
||||||
c[:pretty_title] = "✅ `audited` #{c[:pretty_title]}"
|
c[:pretty_title] = "✅ `audited` #{c[:pretty_title]}"
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
if c.labels.any? { |l| l[:name] == 'D9-needsaudit👮' }
|
if c.labels.any? { |l| l[:name] == 'D2-notlive 💤' }
|
||||||
c[:pretty_title] = "❌ `AWAITING AUDIT` #{c[:pretty_title]}"
|
c[:pretty_title] = "✅ `not live` #{c[:pretty_title]}"
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
if c.labels.any? { |l| l[:name] == 'D5-nicetohaveaudit⚠️' }
|
if c.labels.any? { |l| l[:name] == 'D3-trivial 🧸' }
|
||||||
|
c[:pretty_title] = "✅ `trivial` #{c[:pretty_title]}"
|
||||||
|
next
|
||||||
|
end
|
||||||
|
if c.labels.any? { |l| l[:name] == 'D5-nicetohaveaudit ⚠️' }
|
||||||
c[:pretty_title] = "⏳ `pending non-critical audit` #{c[:pretty_title]}"
|
c[:pretty_title] = "⏳ `pending non-critical audit` #{c[:pretty_title]}"
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
c[:pretty_title] = "✅ `trivial` #{c[:pretty_title]}"
|
if c.labels.any? { |l| l[:name] == 'D9-needsaudit 👮' }
|
||||||
|
c[:pretty_title] = "❌ `AWAITING AUDIT` #{c[:pretty_title]}"
|
||||||
|
next
|
||||||
|
end
|
||||||
|
c[:pretty_title] = "⭕️ `unknown audit requirements` #{c[:pretty_title]}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# The priority of users upgraded is determined by the highest-priority
|
# The priority of users upgraded is determined by the highest-priority
|
||||||
|
|||||||
@@ -4,14 +4,11 @@
|
|||||||
# well as directories common to all runtimes (e.g., ^runtime/common). If there
|
# well as directories common to all runtimes (e.g., ^runtime/common). If there
|
||||||
# are no changes, check if the Substrate git SHA in Cargo.lock has been
|
# are no changes, check if the Substrate git SHA in Cargo.lock has been
|
||||||
# changed. If so, pull the repo and verify if {spec,impl}_versions have been
|
# changed. If so, pull the repo and verify if {spec,impl}_versions have been
|
||||||
# altered since the previous Substrate version used. Also, if any of the
|
# altered since the previous Substrate version used.
|
||||||
# Substrate changes between the previous and current version referenced by
|
|
||||||
# Cargo.lock were labelled with 'D2-breaksapi', label this PR the same.
|
|
||||||
#
|
#
|
||||||
# If there were changes to any runtimes or common dirs, we iterate over each
|
# If there were changes to any runtimes or common dirs, we iterate over each
|
||||||
# runtime (defined in the $runtimes() array), and check if {spec,impl}_version
|
# runtime (defined in the $runtimes() array), and check if {spec,impl}_version
|
||||||
# have been changed since the last release. Also, if there have been changes to
|
# have been changed since the last release.
|
||||||
# the runtime since the last commit to master, label the PR with 'D2-breaksapi'
|
|
||||||
|
|
||||||
set -e # fail on any error
|
set -e # fail on any error
|
||||||
|
|
||||||
@@ -115,21 +112,6 @@ spec_version or or impl_version have changed in substrate after updating Cargo.l
|
|||||||
please make sure versions are bumped in polkadot accordingly
|
please make sure versions are bumped in polkadot accordingly
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
# Now check if any of the substrate changes have been tagged D2-breaksapi
|
|
||||||
(
|
|
||||||
cd "${SUBSTRATE_CLONE_DIR}"
|
|
||||||
substrate_changes="$(sanitised_git_logs "${SUBSTRATE_PREV_REF}" "${SUBSTRATE_NEW_REF}")"
|
|
||||||
echo "$substrate_changes" | while read -r line; do
|
|
||||||
pr_id=$(echo "$line" | sed -E 's/.*#([0-9]+)\)$/\1/')
|
|
||||||
|
|
||||||
if has_label 'paritytech/substrate' "$pr_id" 'D2-breaksapi'; then
|
|
||||||
boldprint "Substrate change labelled with D2-breaksapi. Labelling..."
|
|
||||||
github_label "D2-breaksapi"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
)
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
failed_runtime_checks=()
|
failed_runtime_checks=()
|
||||||
@@ -164,13 +146,6 @@ do
|
|||||||
if [ "${add_spec_version}" != "${sub_spec_version}" ]
|
if [ "${add_spec_version}" != "${sub_spec_version}" ]
|
||||||
then
|
then
|
||||||
|
|
||||||
if git diff --name-only "origin/master...${CI_COMMIT_SHA}" \
|
|
||||||
| grep -E -q -e "$regex"
|
|
||||||
then
|
|
||||||
# add label breaksapi only if this pr altered the runtime sources
|
|
||||||
github_label "D2-breaksapi"
|
|
||||||
fi
|
|
||||||
|
|
||||||
boldcat <<EOT
|
boldcat <<EOT
|
||||||
## RUNTIME: ${RUNTIME} ##
|
## RUNTIME: ${RUNTIME} ##
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user