Commit b9042fd
committed
ci: robustly extract PR numbers in emoji merge delegate workflow (#36732)
The previous `awk -F# '{ gsub(/)$/, ""); print $NF}'` pipeline was fragile: for commits without a `(#PR)` suffix it passed the entire commit line (hash + message) to the Python script, which crashed when treating that string as a regex pattern.
There should rarely be a commit without a `(#PR)` suffix, as usually commits come via bors, but there's no point leaving this loaded gun lying around.
Replace with `grep -oP '(?<=\(#)\d+(?=\))'` which only emits the digit string from commits that contain the exact `(#NUMBER)` pattern, and silently skips any commit without a PR number.
🤖 Prepared with Claude Code1 parent 7d9358e commit b9042fd
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
0 commit comments