Skip to content

Commit

Permalink
Validate PR number
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Dec 6, 2023
1 parent 07cd547 commit 7251886
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ runs:
echo "Event type: unknown or unexpected"
fi
# Validate PR number
if [ ! "${PR_NO}" =~ ^[0-9]+$ ]; then
echo "PR number format incorrect: ${pr}"
exit 1
fi
# Output PR number
echo "Summary ---"
echo -e "\tPR: ${pr}"
echo "pr=${pr}" >> $GITHUB_OUTPUT

0 comments on commit 7251886

Please sign in to comment.