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

chore: update format workflow to use same steps that precommit does #169

Merged
merged 3 commits into from
Oct 20, 2023

Conversation

dbjorge
Copy link
Contributor

@dbjorge dbjorge commented Oct 19, 2023

When I was updating #153 , I noticed that the autoformatter action and the precommit hook were fighting with each other trying to apply inconsistent prettier changes. That was happening because the workflow was using the latest version of prettier and the precommit hook was using the version specified by package.json.

This PR:

  • Updates to latest prettier
  • Modifies the format workflow to use the same commands that the precommit hook does, so future prettier updates won't cause the same class of issue to reappear
  • Restricts the formatter workflow to only attempt to run on PRs from non-forks, since it would break on forks anyway (it won't have commit permissions)

@dbjorge dbjorge requested a review from a team as a code owner October 19, 2023 22:53
Copy link
Contributor

@Zidious Zidious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dbjorge dbjorge merged commit 74f3575 into main Oct 20, 2023
1 check passed
@dbjorge dbjorge deleted the fix-format-action-consistency branch October 20, 2023 23:21
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.

2 participants