CODEOWNERS on project level?

Hannes Kirsman
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!
March 6, 2024

Hi!

I wanted to ask if it would be somehow add people to codewners group on project level even if the person does not have access to all of the repos under that project? It seems it's not currently possible.

I'm actually working in a company that has it's own https://bitbucket.company.tools/ Bitbucket. There's project that has lot of repos, but then I and some other devs have access to only about 10. It would be nice if there was one place to create some groups, then add them via the CODEOWNERS file. Now it seems we need to manage them repoy by repo.

2 answers

0 votes
Hannes Kirsman
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!
March 7, 2024

Thanks for the reply!

I'm ok with copying the file around and it's content very per repo. Some repos are for front-enders, some for backenders, some for infra etc. I'd assume we would have groups like @@GroupFrontend,@@GroupBackend etc. We'd like one place to manage these groups not manage them in 10 repos. Adding same groups 10 times, removing person from it 10 times if somebody leaves. The CODEOWNSERS file probably would not change at all (ideally). I doubt some theme repo would suddenly needs backendenders group.

So we initially saw that we could do it from project level where all repos are. Then the admin who tried to add said they could not add us (probably because we don't have access to many other repos). That's the guess anyways.

Roman Stoffel March 7, 2024

Ok: So copying the CODEOWNERS file is fine at the moment.

So, in Codeowners for Bitbucket (the app, not the built in functionality), the groups can are also resolved again Bitbucket Reviewer Groups (DC), which can be defined on project or repo level.

So, in Bitbucket DC you then can have CODEOWNER files at repository level reference these reviewer groups. And update the reviewer groups at project level with new members / remove members.

On Bitbucket Cloud there is afaik no such concepts yet. There are Groups on the Workspace level, and those are used.

That are the solutions approaches that I am aware of.

PS: As mentioned we are working on more 'Project oriented' CodeOwner features for the app =). But that is in its design phase =).

0 votes
Roman Stoffel March 7, 2024

Hi.

Disclaimer: I'm working in the team for the Codeowners for Bitbucket app, which extends the built in code owner features.

Is it for Bitbucket DC or Bitbucket Cloud?


What exactly do you want to share?
1. Sharing the CODEOWNER file over a project?
2. Or are you ok with the CODEOWNER file copied over, but you want to be per-project flexible on who to assign?

For 1. In general, we are working at the moment on concepts to extend our Codeowners app to give more high level, project wide features. But that is in a very early stage.

For 2. What you could do (at least with the Codeowners for Bitbucket app) is to only use groups in the Code owner files:

```
**/*.java @@JavaExperts
frontent/* @@FrontendExperts
```

And the use Bitbucket Reviewer Groups on a per project level who is in the @@JavaExperts & @@FrontendExperts group. However, the CODEOWNER file still need copy and pasting over all projects.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events