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

CODEOWNERS How to make "all files except one"

LolaRumpler
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 2, 2024

I have such CODEOWNERS file in the root of my project:

@@@Business @user1 @User

* @@Business
!cool-api*business-props* @@Business

I thought that with such a configuration, approval from users in the "Business" group would be required for all files in the project except for files that match the pattern cool-api*business-props* (this is my goal). However, with this configuration, absolutely all files, including those that match the pattern cool-api*business-props*, require approval from users in the "Business" group. What configuration will allow me to achieve the goal where all files, except those that match the specific pattern, need approval from the "Business" group?

3 answers

2 accepted

1 vote
Answer accepted
Michael Rüegg _Mibex Software_
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 6, 2024

Hi @LolaRumpler and welcome to the Atlassian community!

If you use the app Code Owners for Bitbucket Cloud, the required syntax for your goal is as follows:

@@@Business @user1 @User

* @@Business

!cool-api/business-props/**

You can try this out in our Code Owners Playground.

For more information, please check our app docs.

Hope that helps.

Best,

Michael from Mibex (app vendor)

1 vote
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 5, 2024

Hi @LolaRumpler and welcome to the community!

The definition you have in your CODEOWNERS files looks similar to the definitions used by this app:

If your question concerns this specific app, please create a question in the Apps group via

Bitbucket Cloud recently added a built-in CODEOWNERS feature. The set-up and configuration are slightly different than the app's. You can find the documentation for this feature here:

If you experience any issues with Bitbucket's built-in CODEOWNERS feature, please feel free to let me know.

Kind regards,
Theodora

0 votes
LolaRumpler
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 8, 2024

Hi guys!

I use Code Owners for Bitbucket Cloud and yes, I finnaly came up with the decision:

@@@Business @user1 @User

* @@Business
!cool-api*business-props*

Thank you for your answers! 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events