quality-bot
v1.3.13
Published
QBot Online Code Review Application
Downloads
29
Readme
Quality-bot
Quality-bot aims to improve the code quality of the developer in order to reduce the qbot comments. Before every commit, quality-bot reviews the staged files by predefined rulesets from the qbot. If the reviewed file have any comments from the qbot the commit will be automatically aborted. Before we work together, it would be great if you follow the below setups.
Qbot Configuration - One time setup
npx quality-bot configure
By executing this command, quality-bot will ask for three parameters for configuration setup
1.Qbot token (Token will be provided by Qbot system admin team)
2.Environment (global / local)
- Local level configuration is applied to the current repository.
- Global level configuration is applied for all the repositories.
3.Git Core Hooks Path (The core hooks path asked only for global not for local)
Qbot Review
Automatic Review
After QBot plugin configuration(One time setup), The pre-commit file will be generated on the user's local machine on hookspath location. The file contains the below comment
npx quality-bot review
This comment will pull the content of staged files and reviews using Qbot’s pre-defined rulesets configured with the repository.
If any comments occur, The commit will automatically abort, The comment details will be available in the HTML file generated at the temp location and the path is mentioned in CLI.
Review with token
You can directly review any repo with the help of the below command. it will review your changed files which are staged in git. With Different Repo Token
npx quality-bot review --token=<qbot-token>
Notes
1.Quality-bot's review details will not persist.
2.If the user wants to skip the plugin’s review, he will use -n or --no-verify optional parameter at the time of commit.
- git commit -m "Commit Message" -n
- git commit -m "Commit Message" --no-verify
3.The review only happened from CLI and Git bash, not from Git GUI and eclipse.
Developer Guide
Local Setup
npm install
node index.js review
If you want to test our app in different repos you don't need to publish our app. You can directly use your app root location like below.
npx home/sys-user/documents/code-review-pre-hook/ configure
npx home/sys-user/documents/code-review-pre-hook/ review