github.event.pull_request.base.sha not refering to base branching commit #39880
Replies: 7 comments 4 replies
-
Hi there @jeetee and welcome to our community! Thank you for asking a great question 🙂 To get started, introduce yourself in our official introduction thread |
Beta Was this translation helpful? Give feedback.
-
I guess what I'm hoping to find was something along the lines of |
Beta Was this translation helpful? Give feedback.
-
I want to confirm that the issue exists. We have a PR 2 that references PR 1's branch as its base branch. It is correctly shown in the github interface. However, in github actions, |
Beta Was this translation helpful? Give feedback.
-
I ran into this as well. I am trying to implement a type of status check that fails if a branch is not 'up-to-date' with main, to prevent subsequent more expensive status checks from running until main is merged in (GitHub's update feature does not prevent status checks from running). |
Beta Was this translation helpful? Give feedback.
-
anyone have an answer to this? i want to use pretty-quick, and have the same problem. i can not easily get the actual base commit reference. pretty-quick is therefore not finding any changes and not formatting any files. see prettier/pretty-quick#127 |
Beta Was this translation helpful? Give feedback.
-
I ran into this issue too. I'm using it for code coverage diff reports. |
Beta Was this translation helpful? Give feedback.
-
Please see https://github.com/orgs/community/discussions/59677#discussioncomment-10782359 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
As discovered in musescore/MuseScore#13992 (comment) and seemingly by someone else in actions/runner#1689 it seems that there is no way to get the actual base commit reference for a pull request.
While I can see the need for having a reference to the current head of the base branch, I would not expect this to be the value of
github.event.pull_request.base.sha
, but rather of an alternative (to be added?) property such asgithub.event.pull_request.base.head.sha
or the likes.As it stands, it seems to me that there is no way to have an easy test of only the PR changes (in our case, a visual reference test that should run between branch base reference and PR's HEAD).
Unless I'm somehow missing the obvious?
Beta Was this translation helpful? Give feedback.
All reactions