Skip to content

Commit 4265b79

Browse files
authored
Update action.yml (#25)
1 parent 83f7a3b commit 4265b79

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ runs:
5757
if [ "${{ inputs.commit-directly }}" == "true" ]; then
5858
echo "Commit Directly flag is set"
5959
MobbExecString+=" --commit-directly"
60+
61+
# Check if the action is running in the context of a pull request
62+
if [ -n "${{ github.event.pull_request.number }}" ]; then
63+
PR_ID="${{ github.event.pull_request.number }}"
64+
echo "Pull Request ID detected: $PR_ID"
65+
MobbExecString+=" --pr-id $PR_ID"
66+
else
67+
echo "No Pull Request detected. Skipping --pr-id flag."
68+
fi
6069
fi
6170
6271
# Output the final command string for debugging and execute it

0 commit comments

Comments
 (0)