Hi,
I'm trying to implement code owners functionality in our repositories.
I got one to test, removed the configured default reviewers in bitbucket, and added both files to the .bitbucket folder in the root of the repository. I commit the changes and can see the folder and the files in development branch, but when a PR is requested from any branch to development the configuration in CODEOWNERS is not used.
Can anyone help me here please?
Note: the space between @ and teams I need to add it because the forum insisted in placing an User link there, In my file there is no space between the @ and teams.
CODEOWNERS file:
# User @ teams to prefix your team name and let CODEOWNERS know to look in
# your teams.yaml file
# For Client changes designTeam need to be as default PR
# accompanied by 2 of the webTeam
* @ teams/designteam @ teams/webteam
# It can be useful to setup a "meta-owner" that is responsible for changes to the
# teams and CODEOWNERS files
.bitbucket/* some.name@subdomain.domain
teams.yaml file:
webTeam: # Name of the Team
contributors: # Array of contributors by email address
- some.name1@subdomain.domain
- some.name2@subdomain.domain
- some.name3@subdomain.domain
- some.name4@subdomain.domain
- some.name5@subdomain.domain
reviews: # Configuration for selecting PR reviewers
strategy: least_busy # Reverse sort by # of open PR's they are reviewing
select: 2 # and select the top 2 contributors
designTeam:
contributors:
- some.name@subdomain.domain
reviews:
strategy: all # Select all users, no filtering/sorting applied
mobileTeam:
contributors:
- some.name6@subdomain.domain
- some.name7@subdomain.domain
- some.name8@subdomain.domain
reviews:
strategy: all
Hello @Ludwig OHallorans and welcome to the Community!
By checking your CODEOWNERS and teams.yaml file you shared, I see the group names were defined using camel case in the teams file, while in the CODEOWNERS, you refer to all the groups in lowercase. This is the reason why Bitbucket is not finding a match, as the team names are case-sensitive.
Could you edit those files to match the case and try to test opening a pull request again?
Thank you @Ludwig OHallorans !
Patrik S
I did it like that following the example Atlassian put in the setup article.
Thank you.
I will modify and test.
And share my results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome @Ludwig OHallorans ! Happy to hear that it worked :)
We have also updated the Set up and use code owners documentation to include the matching case in the provided example.
Feel free to reach out to the community if you ever need help!
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.