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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,642,190
Community Members
 
Community Events
196
Community Groups

Code Insights REST API for configuring the requirements

Radek Antoniuk
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.
Feb 04, 2021

There is the Code Insights functionality provided by BitBucket Server and we are using this together with SonarQube integration to provide feedback from the CI pipeline and have a quality gate as the screenshot below shows:

Screenshot 2021-02-04 at 13.43.51.png

Now, this is configurable via the UI, but as we are managing a large number of repositories/project, we'd like to keep this configuration in the code and manage it via the API.

However, looking at the REST API for Code Insights and for Repository Management, it seems that BitBucket does not expose a way to manage the Code Insights Requirements settings via API.

Is that possible or would it make sense to add this to the roadmap?

 

3 answers

1 accepted

0 votes
Answer accepted

I couldn't find any documentation on this either, but the web interface is using the REST API as well.

From the browsers dev console the API endpoint for repositories seems to be:

https://bitbucket.company.com/rest/insights/latest/projects/PROJECT/repos/REPO/merge-check/KEY

PUT/GET/DELETE calls are supported. For PUT the following json payload can be used

{
"reportKey":"KEY",
"mustPass":true, // true/false
"minProhibitedSeverity":"LOW" // LOW/MEDIUM/HIGH or omit this key
}

For project-wide configuration: 

https://bitbucket.company.com/rest/insights/latest/projects/PROJECT/merge-check/KEY

Radek Antoniuk
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.
Jun 30, 2022

DevConsole always to the rescue! Simplest solution always works, thanks for this!

0 votes
Radek Antoniuk
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.
May 06, 2022

Just to bump the visibility - any hints?

0 votes
Radek Antoniuk
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.
Jul 01, 2021 • edited May 05, 2022

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events