Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thegit 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 ongit 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 thatnpm 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