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

Allow --dirty argument #5

Merged
merged 4 commits into from
Mar 18, 2023
Merged

Allow --dirty argument #5

merged 4 commits into from
Mar 18, 2023

Conversation

JKHarley
Copy link
Contributor

Usage

    with:
            preset: laravel
            verboseMode: true
            testMode: true
            configPath: "vendor/my-company/coding-style/pint.json"
            pintVersion: 1.2.1
			onlyDirty: true

Why

This allows only changed files to be formatted.

@aglipanci aglipanci merged commit 8849e56 into aglipanci:main Mar 18, 2023
@aglipanci
Copy link
Owner

aglipanci commented Mar 18, 2023

Thanks @JKHarley !

@JKHarley
Copy link
Contributor Author

JKHarley commented Mar 18, 2023

@aglipanci The action seems to be running into a problem when passing it. It worked fine through act. I would recommend reverting for now and I will revisit and hopefully have a fix and create a new PR by tomorrow. Sorry!

@aglipanci
Copy link
Owner

@JKHarley I don't think so. It happens only if you pass older versions in the pintVersion parameter where --dirty was not available. Tested here: https://github.com/aglipanci/laravel-pint-action-demo/actions/runs/4455142664/jobs/7824781043

@JKHarley
Copy link
Contributor Author

@aglipanci Ah correct! Thanks for testing. I was trying with pint version 1.4.0 which I believe is the version it was introduced. Seems to work fine with any version above that.

@pktharindu
Copy link

Hey Guys! First of all, thanks for creating this package! I just popped in here to report a bug I noticed:

The --dirty option only fixes uncommitted changes in Git. Since the files are already committed in this case, it doesn't really do anything. Notice in the action above how it also says 0 files.

That being said, it would be really cool if there is a way to check just the changed files in a PR :)

@aglipanci
Copy link
Owner

@pktharindu currently there are no plans to explore that but you can explore a combination of this action with others like https://github.com/marketplace/actions/get-all-changed-files to achieve what you need.

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.

3 participants