mbrobbel / rustfmt-check

GitHub Action to format Rust code using rustfmt
MIT License
30 stars 6 forks source link

Add pull request mode #1052

Closed Le0X8 closed 2 weeks ago

Le0X8 commented 2 weeks ago

Closes #1042.

Le0X8 commented 2 weeks ago

Does this also work when the PR is created from a fork? If not, maybe we should add that to the README.

Yes, because the action runs on every commit (pull request merging counts as a commit too).

Le0X8 commented 2 weeks ago

@mbrobbel Everything should be fixed now. Full write access is required to create branches and push changes to them.

mbrobbel commented 2 weeks ago

@mbrobbel Everything should be fixed now. Full write access is required to create branches and push changes to them.

Sorry, I meant specifying only the required scopes instead of using write-all.

I think you need contents: write and pull-requests: write. But I'm not sure so this needs some testing.

Le0X8 commented 2 weeks ago

@mbrobbel Yes, you're right, these permissions work as shown here.