Skip to content

Commit

Permalink
fix: get pr for issue_comment event trigger (#377)
Browse files Browse the repository at this point in the history
* fix: get pr for issue_comment event trigger

Signed-off-by: Rishav Dhar <[email protected]>

* test for `issue_comment` event trigger

Signed-off-by: Rishav Dhar <[email protected]>

* complete test

Signed-off-by: Rishav Dhar <[email protected]>

---------

Signed-off-by: Rishav Dhar <[email protected]>
  • Loading branch information
rdhar authored Dec 27, 2024
1 parent df83a80 commit 99250a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ runs:
pr_number=$(echo "${GITHUB_REF_NAME}" | sed -n 's/.*pr-\([0-9]*\)-.*/\1/p')
else
# Get the PR number from the event payload or fallback on 0.
pr_number=${{ github.event.number || 0 }}
pr_number=${{ github.event.number || github.event.issue.number || 0 }}
fi
echo "pr=$pr_number" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit 99250a6

Please sign in to comment.