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.

(cherry picked from commit 8ec348d644)
This commit is contained in:
Wolfgang Walther
2025-08-22 09:18:32 +02:00
committed by github-actions[bot]
parent 57853ff5e1
commit cafd0bbe8a

View File

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