Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull Request changes should only consider latest pushed changes #96

Closed
mccare opened this issue Jul 12, 2021 · 1 comment
Closed

Pull Request changes should only consider latest pushed changes #96

mccare opened this issue Jul 12, 2021 · 1 comment

Comments

@mccare
Copy link

mccare commented Jul 12, 2021

Right now when filtering inside a pull_request workflow, the list of changes will be all changes inside the pull request.

Ideally the filter would run only on the changes that have been made between the last push to the PR and the current push to the PR. I'm aware that rebaseing and force pushing will screw things up (I would then take the whole changeset of the PR as filter). But for small changes to the PR, I don't want to trigger all builds of all components if only one is affected.

Is there a way to do this already?

Christian

@dorny
Copy link
Owner

dorny commented Jul 17, 2021

What you described, is exactly how it works when the action is triggered by push events and the base is configured to be the same branch as it was pushed to.

Event data of push event has before field providing the SHA of last previously pushed commit. I'm not sure if there is such a field in event of PR update. If yes, then the behavior you described should be in theory possible to implement. An alternative would be to run the workflow on each push to a feature branch, maybe combined with some other filter to do it only when there is an rPR.

To be completely honest, I don't plan to implement anything to make this possible. I simply don't have enough time. If that feature would be really useful for you, I would suggest to fork this repo and use it as a base for your own implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants