-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
Automate cargo +nightly fmt
on push
#506
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thank you! Would move the whole rustfmt thing into "don't want to think about it" territory.
.github/workflows/rustfmt.yml
Outdated
on: | ||
push: | ||
branches: | ||
- master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we can probably lift this down into the commit action, i believe.
may at least try to run rustfmt everywhere possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to run this when pushed to any branch in your repo.
cargo +nightly fmt
on push to mastercargo +nightly fmt
on push
@clux The push after rustfmt failed because |
Ah, that makes sense. Thank you. Ok. I'll probably set up a PAT and fix that up next PR. But ugh, the permissions on these PATs are a bit scary. |
Yeah :( It should be possible to create a PR automatically based on the changes. I can look into that. |
Automate what @clux has been doing after merging PRs (#505 (comment)). Uses https://github.com/marketplace/actions/git-auto-commit to commit any changes after
cargo +nightly fmt --all
.It's also possible to do this when PRs are opened. But to handle PRs from forks, we need to use
pull_request_target
event and forks needs to have GitHub Actions enabled.