Interact with Gitar Bot
DJ Feature Documentation
Overview
The DJ feature is an extension to the Gitar bot that allows developers to execute custom commands within pull requests. This feature enhances the automated code review process by enabling specific actions to be performed on the codebase.
Supported Commands
Currently, the DJ feature supports the following command:
skip-cleanup <variable|keyword>
: This command instructs the bot to skip the cleanup process for the specified variable or keyword in the current pull request.
How It Works
- When reviewing Gitar’s cleanup pull request, you can leave a comment on a specific line of code.
- In your comment, you use the DJ command (e.g.,
/skip-cleanup
) followed by the specific variable or keyword you want to target. - The bot processes the command for that specific variable or keyword in the current pull request.
Usage
To use the DJ feature, follow these steps:
- Open a Gitar’s cleanup pull request in review mode.
- Navigate to the line containing the variable or keyword you want to skip cleanup for.
- Leave a comment on that line with the following format:
Replace <variable|keyword>
with the specific single word you want to target.
Example
Let’s say you have the following line in your code:
If you want to skip cleanup for unused_variable
, you would leave a comment on this line saying:
The bot will then skip the cleanup process for unused_variable
in this pull request.
Commits for DJ Commands
Each DJ command transaction will result in a new commit in the pull request. This means:
- Every time you successfully use a DJ command, a new commit will be added to the pull request.
- You can see the exact changes made by each DJ command by reviewing these commits.
- The pull request history will show a clear trail of all DJ commands applied.
Future Enhancements
While currently only the skip-cleanup
command is supported and limited to single-word variables or keywords, the architecture is designed to easily accommodate additional DJ commands and more complex targets in the future. This extensibility allows for the addition of more sophisticated automated actions as needed.
Feedback and Support
If you encounter any issues or have suggestions for improving the DJ feature, please contact the Gitar support team or open an issue in the repository.