ci/github-script/commits: fix not-cherry-picked-because regex

This needs the multiline flags, which enables `^` and `$` to match line
start and line end, not start and end of the whole string.

Not sure how this got past testing when initially merged.
This commit is contained in:
Wolfgang Walther
2025-08-22 09:18:32 +02:00
parent 25446fd581
commit 8ec348d644

View File

@@ -22,7 +22,7 @@ module.exports = async ({ github, context, core, dry }) => {
async function extract({ sha, commit }) { async function extract({ sha, commit }) {
const noCherryPick = Array.from( const noCherryPick = Array.from(
commit.message.matchAll(/^Not-cherry-picked-because: (.*)$/g), commit.message.matchAll(/^Not-cherry-picked-because: (.*)$/gm),
).at(0) ).at(0)
if (noCherryPick) if (noCherryPick)