-
Hi. I have an action that is supposed to get the changed files in a PR, but also when there is a comment on the pr. On comment: on pr: This is how the job is set up:
I am really confused as to why i get mixxed results, whether its based on a pr(or commit to the pr branch), and when there's a comment made in the PR. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi @jonashoye can you include the event you used to trigger the workflow? |
Beta Was this translation helpful? Give feedback.
-
@jackton1 sure, it looks something like this:
|
Beta Was this translation helpful? Give feedback.
-
Hi @jonashoye, I’ll suggest changing base_sha: ${{ github.event.pull_request.base.sha }} To base_sha: main The GitHub context values for issue_comment doesn’t include the pull_request object. Alternatively, you can change the event to pull_request_review_comment depending your use case. |
Beta Was this translation helpful? Give feedback.
-
Hey, I am facing a similar issue. Setting What I would like to achieve: compare latest PR commit to staging branch. What actually happens: compares second last commit to staging to last commit to staging. My setup looks something like this:
Any clue for me how to resolve @jackton1 ? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Hi @jonashoye, I’ll suggest changing
To
The GitHub context values for issue_comment doesn’t include the pull_request object.
Alternatively, you can change the event to pull_request_review_comment depending your use case.