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

Add formatting workflow #1770

Merged
merged 2 commits into from
Dec 26, 2024
Merged

Conversation

CubesterYT
Copy link
Member

Add a new workflow that should format a PR when a message is "!format"

Further testing by others is needed.

@CubesterYT CubesterYT added the pr: other Pull requests that neither add new extensions or change existing ones label Nov 30, 2024
@SharkPool-SP SharkPool-SP self-requested a review December 1, 2024 00:25
@CST1229
Copy link
Collaborator

CST1229 commented Dec 11, 2024

I still think this should be a workflow_dispatch workflow, and not a comment-based one.

@CubesterYT
Copy link
Member Author

Are workflow_dispatchs accessible by normal people?

@GarboMuffin
Copy link
Member

If they enable GitHub actions on their fork. Do they need to do that anyways for this to work?

@CubesterYT
Copy link
Member Author

As it currently works, when the comment command is said, actions will auto format the PR, in theory. I haven't done extensive testing, so I'd like if others actually tried.

@CST1229
Copy link
Collaborator

CST1229 commented Dec 11, 2024

As it currently works, when the comment command is said, actions will auto format the PR, in theory. I haven't done extensive testing, so I'd like if others actually tried.

i don't think actions would allow committing on a user's branch without them enabling actions (see also: sa's autoformat action which i'm pretty sure you do have to enable actions for)

@GarboMuffin GarboMuffin changed the title New format workflow Add formatting workflow Dec 26, 2024
@GarboMuffin
Copy link
Member

GarboMuffin commented Dec 26, 2024

Ok, will just merge it and see what happens

For your reference there were a few problems with the original code

  • missing write contents permission (this entire organization is readonly by default)
  • ${{ }} inside shell script allows arbitrary shell code execution
  • condition check can be done at the job level, without starting any shell scripts

@GarboMuffin GarboMuffin merged commit 32de315 into TurboWarp:master Dec 26, 2024
3 checks passed
@CubesterYT
Copy link
Member Author

Great, this will help so much!

@Thebloxers998
Copy link

Great, this will help so much!

Wait, but how do I use this

1 similar comment
@Thebloxers998
Copy link

Great, this will help so much!

Wait, but how do I use this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: other Pull requests that neither add new extensions or change existing ones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants