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

Add only_changed_pr #135

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

jetmore
Copy link

@jetmore jetmore commented Jan 29, 2024

This PR includes the changes for #134. If that PR changes significantly or is rejected, this PR will need to be reworked

This PR adds new option only_changed_pr. This behaves similarly to only_changed, except instead of only considering files which were modified in the last commit, this option only considers files which were modified in any commit included in the current PR.

Before this change, if you tried to use `dry` and `only_changed together, it acted as if `only_changed` was ignored.  There was no code specific to `only_changed` down the `dry` code path.

This commit’s solution is to run prettier on the entire code base (as was already being done) and then, before doing any comparisons, reset changes to files that were not modified in the last commit.
This behaves similarly to only_changed, except instead of only considering files which were modified in the last commit, this option only considers files which were modified in any commit included in the current PR.
@jetmore jetmore changed the title Add only changed pr Add only_changed_pr Jan 29, 2024
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

Successfully merging this pull request may close these issues.

None yet

1 participant