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

[Demo] Slash command code formatting - Python #11

Closed
wants to merge 10 commits into from

Conversation

retepsnave
Copy link

Slash command code formatting - Python

Slash commands can be used to execute code formatting tools on pull request branches.
The slash commands are dispatched to slash-command-dispatch-processor repository to be processed by workflows here.

The code formatting workflows do the following:

  1. Check out the pull request branch
  2. Execute the code formatting tool
  3. Commit the changes to the pull request branch
  4. Add a 🎉 reaction to the comment containing the slash command

The following command formats Python using autopep8

/autopep8

The following command formats Python using Black

/black

The demo can be reset with this command.

/reset-demo

Feel free to try it out! 💬

@peter-evans peter-evans added the demo This issue or pull request is for demonstration purposes label Dec 4, 2019
@peter-evans
Copy link
Owner

/autopep8

@peter-evans
Copy link
Owner

/reset-demo

@peter-evans
Copy link
Owner

/black

@peter-evans
Copy link
Owner

/reset-demo

@chiefjester
Copy link

/black

@chiefjester
Copy link

/autopep8

@peter-evans
Copy link
Owner

/reset-demo

@stack72
Copy link

stack72 commented Feb 25, 2020

/black

@peter-evans
Copy link
Owner

/reset-demo

1 similar comment
@peter-evans
Copy link
Owner

/reset-demo

@peter-evans
Copy link
Owner

/reset-demo

@peter-evans
Copy link
Owner

@stack72 Sorry it didn't work when you tried it. I've just realised that the demo gets stuck if /reset-demo isn't used after every /black or /autopep8. I need to find a better way to reset the demo!

For now I've recreated the PR here: #28

@denizs
Copy link

denizs commented Sep 17, 2020

/black

@ckolyakovmmc
Copy link

/reset-demo

@nhuray
Copy link

nhuray commented Feb 27, 2021

/awesome

@mtaha3249
Copy link

/reset-demo

@mtaha3249
Copy link

/black

@cdnninja
Copy link

/reset-demo

@chubchubsancho
Copy link

/autopep8

@s2mr
Copy link

s2mr commented Jan 18, 2022

/black

@ramosian-glider
Copy link

/autopep8

@ramosian-glider
Copy link

/reset-demo

@niallscc
Copy link

/reset-demo

1 similar comment
@ppigazzini
Copy link

/reset-demo

@ppigazzini
Copy link

/black

1 similar comment
@frap
Copy link

frap commented Nov 30, 2022

/black

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demo This issue or pull request is for demonstration purposes
Projects
None yet
Development

Successfully merging this pull request may close these issues.