You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it seems than when I create e.g three commits locally and push only after the 3rd commit this will only check the last commit.
I don't think the firstParent would be suitable for this since that would check all of the history as far as I understand. Is that right?
I'm not sure whether the information for the commit range that was just pushed is available. As far as the environment variables I don't see anything that has to do with the range. I think something that could work would be the before field of the event (push), which should be available at GITHUB_EVENT_PATH.
I'd be happy to help but don't really know how to develop GitHub actions and most importantly how I could test this so would need to get some getting started on that before I could help.
The text was updated successfully, but these errors were encountered:
Hi @vidavidorra, thank you for the issue! I completely forgot about this scenario 💥
I don't think the firstParent would be suitable for this since that would check all of the history as far as I understand. Is that right?
Actually firstParent does something different: it only checks for commits in the current branch. So for instance, if someone pushes a merge commit, we won't do checks in the commits that came from the merge (e.g. commits from master when you're just syncing with master). So it looks like firstParent option will still work when checking the range 🎉
You're right, we can use the GITHBU_EVENT_PATH to get the before information from the event. Since we use @octokit/github, we can just get the event information in github.context.payload. I did some initial tests and it worked. There's just one edge case that I noticed while testing: before field can point to a commit that doesn't exist when the push is forced, so when the forced field from event is true I will need to get just the latest commit as it was done before.
Regarding testing, currently I just test the changes in another repo and keep pushing changes to test. I will create a setup with better tests but still didn't have time to do that yet.
Currently it seems than when I create e.g three commits locally and push only after the 3rd commit this will only check the last commit.
I don't think the
firstParent
would be suitable for this since that would check all of the history as far as I understand. Is that right?I'm not sure whether the information for the commit range that was just pushed is available. As far as the environment variables I don't see anything that has to do with the range. I think something that could work would be the
before
field of the event (push), which should be available atGITHUB_EVENT_PATH
.I'd be happy to help but don't really know how to develop GitHub actions and most importantly how I could test this so would need to get some getting started on that before I could help.
The text was updated successfully, but these errors were encountered: