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

[Feature-Request] Should be able to check only changed files during CI. #21

Labels
enhancement New feature or request hacktoberfest

Comments

@BiosBoy
Copy link

BiosBoy commented Oct 9, 2020

What exactly happened?
Prettier Action checks all the codebase instead of the files which were changed only on the particular commit.

Steps to reproduce the behavior:

    - name: Prettier Action
      uses: creyD/prettier_action@v3.0
      with:
        prettier_version: 1.19.1
        prettier_options: --write **/*.{js,ts,tsx}

What should've happened?
Should be able to check only changed files during CI.

How did it look?
Check the whole codebase instead. Why?

Where did you encounter the problem?

  • OS: ubuntu-latest
@BiosBoy BiosBoy added the bug Something isn't working label Oct 9, 2020
@BiosBoy BiosBoy changed the title [BUG] [BUG] Should be able to check only changed files during CI. Oct 9, 2020
@creyD
Copy link
Owner

creyD commented Oct 12, 2020

Can you provide a PR for this?

@creyD creyD added enhancement New feature or request hacktoberfest and removed bug Something isn't working labels Oct 13, 2020
@creyD creyD changed the title [BUG] Should be able to check only changed files during CI. [Feature-Request] Should be able to check only changed files during CI. Oct 13, 2020
@BiosBoy
Copy link
Author

BiosBoy commented Oct 14, 2020

Sorry, don't have much time :(

@creyD
Copy link
Owner

creyD commented Oct 15, 2020

Note: git diff --name-only HEAD^..HEAD returns a list of changed files in the latest commit

@creyD
Copy link
Owner

creyD commented Oct 15, 2020

I will try something tomorrow!

@creyD
Copy link
Owner

creyD commented Oct 16, 2020

Could you test this feature please on your repository? You would need to use creyD/prettier_action@dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment