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
Copy file name to clipboardExpand all lines: scripts/release/check_commit_metadata.sh
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,23 @@ main() {
118
118
title2=${parts2[*]:2}
119
119
fi
120
120
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
+
121
138
if [[${title1}!="${title2}" ]];then
122
139
log"Invariant failed, cherry-picked commits have different titles:\"${title1%$'\n'}\" !=\"${title2%$'\n'}\", attempting to check commit body for cherry-pick information..."