Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

CODEOWNERs behaviour

Karan Jadaun
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!
September 1, 2025

Suppose you have added - src/lib/libsmlb/** @@load_balancer_cluster_approvers, then what type of files it will include? In our case it is sometimes including src/lin/libsmlbabc also and these kind of unrelated files. 

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 2, 2025

Hi Karan and welcome to the community!

I would like to ask a few questions so I can better help you:

  1. Are you using Bitbucket Cloud or Bitbucket Data Center? Your community question has the tag 'bitbucket-cloud', however, I don't see a Bitbucket Cloud account with your email address in our system. If you are unsure which one you use, the URL of a Bitbucket Cloud repo starts with https://bitbucket.org/ while Bitbucket Data center repos have a different, custom URL.
  2. Are you using the built-in Bitbucket CODEOWNERS feature or are you using a third-party extension for CODEOWNERS?
  3. Can you also please clarify what you mean by "it is sometimes including src/lin/libsmlbabc"? Does a PR have changes only in files of the directory src/lin/libsmlbabc/ and not in files of the directory src/lib/libsmlb/, and are the CODEOWNERS added to the PR in this case?

Kind regards,
Theodora

0 votes
Akriti Sagar
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.
September 1, 2025

Hi Karan,

In a CODEOWNERS file, the patterns are interpreted as path globs. The entry src/lib/libsmlb/** will match everything under the src/lib/libsmlb/ directory (including all nested folders and files). It should not normally match something like src/lin/libsmlbabc, since that path does not start with src/lib/libsmlb/.

If you’re seeing unrelated paths included, a couple of things to check:

  • Make sure there isn’t another overlapping pattern higher up in your CODEOWNERS file that is assigning approvers to those files.

  • Confirm whether your platform is using the default GitHub-style matching rules or if it has any product-specific extensions (for example, GitLab or Bitbucket Server may handle wildcards slightly differently).

  • Try testing the pattern locally with git check-ignore -n <path> to see which rule is being applied.

In short: the pattern you shared should only include files directly under src/lib/libsmlb/. If other paths are being included, it’s likely due to another matching rule elsewhere in your CODEOWNERS file.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events