mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix(scripts/release): handle cherry-pick bot titles in check commit metadata (#17535)
This commit is contained in:
committed by
GitHub
parent
b3cc8e56d2
commit
c106aee0d6
@@ -118,6 +118,23 @@ main() {
|
||||
title2=${parts2[*]:2}
|
||||
fi
|
||||
|
||||
# Handle cherry-pick bot, it turns "chore: foo bar (#42)" to
|
||||
# "chore: foo bar (cherry-pick #42) (#43)".
|
||||
if [[ ${title1} == *"(cherry-pick #"* ]]; then
|
||||
title1=${title1%" ("*}
|
||||
pr=${title1##*#}
|
||||
pr=${pr%)}
|
||||
title1=${title1%" ("*}
|
||||
title1="${title1} (#${pr})"$'\n'
|
||||
fi
|
||||
if [[ ${title2} == *"(cherry-pick #"* ]]; then
|
||||
title2=${title2%" ("*}
|
||||
pr=${title2##*#}
|
||||
pr=${pr%)}
|
||||
title2=${title2%" ("*}
|
||||
title2="${title2} (#${pr})"$'\n'
|
||||
fi
|
||||
|
||||
if [[ ${title1} != "${title2}" ]]; then
|
||||
log "Invariant failed, cherry-picked commits have different titles: \"${title1%$'\n'}\" != \"${title2%$'\n'}\", attempting to check commit body for cherry-pick information..."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user