@@ -19,38 +19,33 @@ The action lets you customize the number of metrics based on
1919
2020## How to use it?
2121
22- ### Step 1: Get your Code Inspector API keys
22+ ### Step 1: Get your Code Inspector API Token
2323
2424Sign up on [ Code Inspector] ( https://www.code-inspector.com ) .
2525
26- In your profile, generate API keys.
26+ In the top right menu go to API token
2727
28- ![ Generate API keys ] ( images/ci-generate- api-keys.png )
28+ ![ Generate API Token ] ( images/api-token-creation.gif )
2929
3030
31- Once you click on the button, the following window will appear .
31+ Create a token and save it .
3232
33- ![ Example API keys] ( images/ci-api-keys.png )
3433
34+ ### Step 2: Configure your Code Inspector API Token in your GitHub repository
3535
36- ### Step 2: Configure your Code Inspector API keys in your GitHub repository
37-
38- You need to add your Code Inspector API keys into GitHub.
36+ You need to add your Code Inspector API Token into GitHub.
3937
4038On GitHub, go in your repository settings, click on the secret * Secrets* (on the right) and create a new secret.
4139
42- Create a secret called ` CODE_INSPECTOR_ACCESS_KEY ` and set it to the value of the access key generated at the previous step.
43-
44- ![ Example API keys] ( images/github-add-access-key.png )
40+ Create a secret called ` CODE_INSPECTOR_API_TOKEN ` and set it to the value of the API token generated at the previous step.
4541
42+ ![ Create API token on GitHub] ( images/github-add-api-token.png )
4643
47- Create another secret called ` CODE_INSPECTOR_SECRET_KEY ` and set it to the value of the secret key generated at the previous step.
4844
49- ![ Example API keys ] ( images/github-add- secret-key.png )
45+ Once the secret is created, the secrets page will look as follow.
5046
51- Once all secrets have been created, we should have the following secrets generated.
5247
53- ![ Example API keys ] ( images/github-keys-generated .png )
48+ ![ Example API token on GitHub ] ( images/github-action-secrets .png )
5449
5550
5651### Step 3: Configure the GitHub action
7166 uses : codeinspectorio/github-action@master
7267 with :
7368 repo_token : ${{ secrets.GITHUB_TOKEN }}
74- code_inspector_access_key : ${{ secrets.CODE_INSPECTOR_ACCESS_KEY }}
75- code_inspector_secret_key : ${{ secrets.CODE_INSPECTOR_SECRET_KEY }}
69+ code_inspector_api_token : ${{ secrets.CODE_INSPECTOR_API_TOKEN }}
70+ force_ref : ' none '
7671 min_quality_grade : ' WARNING'
7772 min_quality_score : ' 50'
7873 max_defects_rate : ' 0.0001'
8580The following parameters should *NOT* be changed:
8681
8782 * **repo_token**: this is how Code Inspector can access your repository
88- * **code_inspector_access_key** and **code_inspector_access_key **: this is how the action can communicate with the Code Inspector analysis engine.
83+ * **code_inspector_api_token **: this is how the action can communicate with the Code Inspector analysis engine.
8984
9085The following parameters can be changed:
86+ * **force_branch** is used to force the branch being checked. Use 'none' if you want to analyze the current branch.
9187 * **min_quality_grade**: the minimum grade your project should have. Valid values are: ` EXCELLENT`, `GOOD`, `NEUTRAL`, `WARNING`, `CRITICAL`
9288 * **min_quality_score**: the minimum code quality score your project should have. This is a value between `0` and `100`.
9389 * **max_defects_rate**: the number of defects per line of code. For example, the value `0.001` means 1 defect per 1000 lines of codes.
0 commit comments