This bot is an automated tool designed to help maintain repositories by identifying and notifying about stagnant code files that might require review. It assists in keeping your projects up-to-date and promotes regular code reviews to ensure code quality.
CodeReviewBot analyzes the commit history of files within your repository to identify files that have not been modified for a certain period of time. When it detects such stagnant files, it creates an issue within the repository, suggesting that a code review may be needed for those files.
- Automated identification of stagnant code files.
- Creation of issues for files that haven't been modified recently.
- Customizable time threshold for considering files as stagnant.
- Helps maintain code quality by encouraging regular reviews.
- Reduces the risk of having outdated or unmaintained code.
You can install the bot either via GitHub Marketplace or manually.
- Visit the bot's GitHub Marketplace page.
- Click Install and follow the prompts to grant access to the bot.
- After installation, the bot will automatically start working with your repository.
If you cannot use GitHub Marketplace, follow these two steps to configure the bot manually:
- Open your GitHub repository.
- Go to Settings > Collaborators and teams.
- In the Collaborators section, click Invite a collaborator.
- Enter the bot's GitHub username (e.g.,
@revive-code-bot
) and send the invitation.
- Open your repository and go to Settings > Webhooks.
- Click "Add webhook".
- Use the following URL as the Payload URL:
https://www.rehttp.net/p/https://revive-code-bot.ilaletdinov.ru/hook/github
- Set the Content type to
application/json
. - Select "Issue comments", "Issues", "Pushes" event as the trigger event.
- Click "Add webhook" to save.
To configure the app, create a .revive-code-bot.yml
file in the root of your repository with the following options:
# Schedule when the bot checks for stagnant files (cron format)
# Visit https://crontab.guru
cron: '11 2 6 * *' # Runs on the 6th day of each month at 02:11 AM
# Define file patterns to analyze using glob syntax
# glob: '**/*.py' # Analyze all Python files
# glob: 'src/**/*.js' # Analyze JavaScript files in the src directory and its subdirectories
glob: '**/*.py' # Example: analyze all Python files
# Limit the maximum number of files listed in an issue
limit: 5