Skip to content

More Prettier action fixing#464

Merged
aphillips merged 2 commits intounicode-org:mainfrom
eemeli:fix-pr-prettier
Aug 30, 2023
Merged

More Prettier action fixing#464
aphillips merged 2 commits intounicode-org:mainfrom
eemeli:fix-pr-prettier

Conversation

@eemeli
Copy link
Copy Markdown
Collaborator

@eemeli eemeli commented Aug 30, 2023

This shouldn't be as hard as it appears to be, but alas.

In forks where it's allowed to run, the action should still "just work".

For PRs coming from branches in this repo, the ref is now set so that the git push should "just work".

For PRs coming from branches in forks, it doesn't look like there's a way to get the action to have sufficient access so that it can write to that branch from the target repo, even if a human user could. So for those cases, the explicit repository is set and the action will only fail on git push if there are any files that Prettier should be run on.

In other words, the action should now work as a CI check when it's not able to automatically fix things.

A package.json is added, so that npm install && npm run prettier can be run locally to apply the same fixes as the action would.

The workflow_dispatch action will also allow triggering the action manually for a given branch.

CC @ryzokuken

@eemeli eemeli requested a review from aphillips August 30, 2023 08:43
@aphillips aphillips added the fast-track Editorial change permitted to use fast-track merge rules label Aug 30, 2023
@aphillips
Copy link
Copy Markdown
Member

Is this ready? If so, let's merge it.

@aphillips aphillips merged commit 9259563 into unicode-org:main Aug 30, 2023
@eemeli eemeli deleted the fix-pr-prettier branch August 30, 2023 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track Editorial change permitted to use fast-track merge rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants