You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backport #10323 into `stable2509` from EgorPopelyaev.
See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.
<!--
# To be used by other automation, do not modify:
original-pr-number: #${pull_number}
-->
---------
Co-authored-by: Egor_P <egor@parity.io>
# Skip semver check if PR targets stable branch and has R0-no-crate-publish-require label
117
+
if [[ "$BASE_BRANCH" =~ ^stable[0-9]{4}$ ]]; then
118
+
if echo "$PR_LABELS" | grep -q "R0-no-crate-publish-require"; then
119
+
echo "ℹ️ Skipping the SemVer check is not recommended and should only be done in rare cases: PR targets stable branch '$BASE_BRANCH' and has 'R0-no-crate-publish-require' label."
120
+
exit 0
121
+
fi
122
+
fi
123
+
113
124
export CARGO_TARGET_DIR=target
114
125
export RUSTFLAGS='-A warnings -A missing_docs'
115
126
export SKIP_WASM_BUILD=1
116
127
117
-
if ! parity-publish --color always prdoc --since old --validate prdoc/pr_$PR.prdoc $PRDOC_EXTRA_ARGS -v --toolchain $TOOLCHAIN; then
128
+
prdoc_file="prdoc/pr_$PR.prdoc"
129
+
130
+
# Always run parity-publish to check for all issues (mismatches and missing crates)
131
+
# Capture output to check for specific error types
132
+
parity_output=$(mktemp)
133
+
if ! parity-publish --color always prdoc --since old --validate prdoc/pr_$PR.prdoc $PRDOC_EXTRA_ARGS -v --toolchain $TOOLCHAIN 2>&1 | tee "$parity_output"; then
134
+
135
+
# Check if there are missing crates (files changed but not listed in prdoc)
136
+
if grep -q "Files changed but crate not listed in PR Doc" "$parity_output"; then
137
+
rm -f "$parity_output"
138
+
cat <<EOF
139
+
140
+
👋 Hello developer! The SemVer check found crates with changes that are not listed in the prdoc file.
141
+
142
+
It is recommended to add all changed crates to the prdoc.
143
+
144
+
Please check the output above and see the following links for more help:
0 commit comments