Skip to content

Commit b04f2c3

Browse files
p3dr0rvCopilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <[email protected]>
1 parent 26250f0 commit b04f2c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/validate-pr-ab-id.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ jobs:
3939
# Sanitize PR body by removing backticks to prevent command substitution
4040
clean=$(printf "%s" "$PR_BODY" | tr -d '`')
4141
42-
# Extract AB ID (AB#1234567)
43-
result=$(printf "%s" "$clean" | grep -oP '(?<=AB#)\d+')
42+
# Extract AB ID (AB#1234567) - takes first match if multiple exist
43+
result=$(printf "%s" "$clean" | grep -oP '(?<=AB#)\d+' | head -n 1)
4444

4545
echo "id=$result" >> "$GITHUB_OUTPUT"
4646

0 commit comments

Comments
 (0)