Skip to content

Commit 453e513

Browse files
authored
Fixed report-merged-pr action (#41270)
### What does this PR do? If the PR has multiple PR numbers, we should take the last one and not fail. (see this [failure](https://github.com/DataDog/datadog-agent/actions/runs/18007355149/job/51230702806)) ### Motivation ### Describe how you validated your changes ### Additional Notes
1 parent 03c2338 commit 453e513

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/report-merged-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
echo "Last commit message: $COMMIT_MESSAGE"
3434
3535
# Extract PR number from format "(#1234)" in commit message
36-
PR_NUMBER=$(echo "$COMMIT_MESSAGE" | grep -oE '\(#[0-9]+\)' | grep -oE '[0-9]+')
36+
PR_NUMBER="$(echo "$COMMIT_MESSAGE" | grep -oE '\(#[0-9]+\)' | grep -oE '[0-9]+' | tail -n 1)"
3737
3838
# If no PR number found in commit message, exit with error
3939
if [ -z "$PR_NUMBER" ]; then

0 commit comments

Comments
 (0)