-
Notifications
You must be signed in to change notification settings - Fork 234
Add slash command "/format" to automatically format PRs #646
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
Conversation
weiji14
left a comment
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.
Ok, I've added an APP_ID and APP_PRIVATE_KEY secret to the PyGMT repo which generates a token using the GenericMappingTools bot account:
See if the suggested changes work, not sure if it will work on your personal branch though @seisman, since the APP is installed only on GenericMappingTools/pygmt.
Co-authored-by: Wei Ji <[email protected]>
Co-authored-by: Wei Ji <[email protected]>
weiji14
left a comment
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.
How about modifying the "Run make format and make check to make sure the code follows the style guide." line in https://github.com/GenericMappingTools/pygmt/blob/master/.github/PULL_REQUEST_TEMPLATE.md to mention the new /format command?
|
|
Perhaps we can add a note in the template like: |
weiji14
left a comment
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.
Getting there!
Co-authored-by: Wei Ji <[email protected]>
weiji14
left a comment
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.
Awesome, thanks for the good work @seisman, can't wait to try this out properly!
The workflow ran on every GitHub issue and pull request comments. This patch ensures that the the slash command dispatch workflow is triggered by Pull Request comments only. Patches #646.
) The workflow ran on every GitHub issue and pull request comments. This patch ensures that the the slash command dispatch workflow is triggered by Pull Request comments only. Patches #646.
…nericMappingTools#1248) The workflow ran on every GitHub issue and pull request comments. This patch ensures that the the slash command dispatch workflow is triggered by Pull Request comments only. Patches GenericMappingTools#646.

Description of proposed changes
This PR adds a special github action to enable slash commands in comments. With the feature enabled, anyone, who have written permission to a pull request, can write
/formatat the first line of a comment to trigger the "format" action, which can format the codes automatically.See #645 for context.
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.