-
Notifications
You must be signed in to change notification settings - Fork 19
Pull Request Comment Syntax
GitHub and GitLab are supported for now.
Only open pull/merge requests will be scanned for comments.
Comments pointing to a changed file are supported. It is important to place the comment at the specific line where you want the refactoring to be performed. You want to rename a method? Place the comment at the line where the method is declarated.
We currently support the following refactorings:
- Rename-Method
- Remove-Method-Parameter
- Add-Annotation-Override
- Reorder-Modifier
We are using a refactoring specific language similar to SQL to process comments. Every comment needs to start with the tagged name of the bot user (the user who created the pull request, example: @Botname with Botname being the username of the bot account).
BOT-Command: @Botname ADD ANNOTATION Override
BOT-Command: @Botname REORDER MODIFIER
BOT-Command: @Botname RENAME METHOD TO y
y needs to be replaced by the new name of the method.
BOT-Command: @Botname REMOVE PARAMETER y
y needs to be replaced by the parameter name of the parameter that should be deleted.