Skip to content

Commit dd50c4e

Browse files
fix(scripts/release): handle cherry-pick bot titles in check commit metadata (cherry-pick coder#17535) (coder#17537)
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
1 parent bda202f commit dd50c4e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/release/check_commit_metadata.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,23 @@ main() {
118118
title2=${parts2[*]:2}
119119
fi
120120

121+
# Handle cherry-pick bot, it turns "chore: foo bar (#42)" to
122+
# "chore: foo bar (cherry-pick #42) (#43)".
123+
if [[ ${title1} == *"(cherry-pick #"* ]]; then
124+
title1=${title1%" ("*}
125+
pr=${title1##*#}
126+
pr=${pr%)}
127+
title1=${title1%" ("*}
128+
title1="${title1} (#${pr})"$'\n'
129+
fi
130+
if [[ ${title2} == *"(cherry-pick #"* ]]; then
131+
title2=${title2%" ("*}
132+
pr=${title2##*#}
133+
pr=${pr%)}
134+
title2=${title2%" ("*}
135+
title2="${title2} (#${pr})"$'\n'
136+
fi
137+
121138
if [[ ${title1} != "${title2}" ]]; then
122139
log "Invariant failed, cherry-picked commits have different titles: \"${title1%$'\n'}\" != \"${title2%$'\n'}\", attempting to check commit body for cherry-pick information..."
123140

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy