Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Code Insights merge checks report key --> Where do I find this???

Ali Ishkuntana
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 13, 2023

Code Insights merge checks

You can block pull requests from being merged until their Code Insights reports meet your requirements. You can set these merge checks for all the repositories in a project, or a single repository, and your requirements can be based on whether:

  • a specific report is present
  • the report passes or fails
  • the report adds annotations of a certain severity to the diff

Annotations only block merging if they are on the diff. If they’re somewhere else on a changed file, or on a file that hasn’t changed they won’t block the merge.

To add a Code Insights merge check for all the repositories in a project (requires project admin permissions):

  1. Go to Project settings > Code Insights.
  2. Enter the report key of your required report. You can find this on the report in the bottom right.
  3. Enter its required status and its annotation requirements.
  4. Click add.

To add a Code Insights merge check for a repository (requires repository admin permissions):

  1. Go to Repository settings > Code Insights.
  2. Enter the report key of your required report. You can find this on the report in the bottom right.
  3. Enter its required status and its annotation requirements.
  4. Click add.

 

 

Where is the "report key" found listed in the bolded above? Which report is this referring to? Where does this report get generated?

1 answer

0 votes
Javier Perez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 18, 2023

Reports can be attached using REST API, or you may be using a tool which is prepared to attach reports back to a PR

If using REST API you'll give the report key as a mandatory parameter. If there is a tool which is attaching the report, the tool will most probably (or it's expected to) expose the report key in its report

REST API documentation: https://developer.atlassian.com/server/bitbucket/how-tos/code-insights/

BTW, not all the tools expose the report key in the bottom right

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events