Questions tagged [github-codeowners]
24 questions
14
votes
2 answers
How to enforce review from codeowners without automatically requesting a review?
I have a GitHub repo which automatically requests reviews from the codeowners team (defined in .github/CODEOWNERS) when a pull request is first opened. What I want is to enforce the requirement that pull requests must be approved by a codeowner, but…

K--
- 594
- 1
- 8
- 20
5
votes
1 answer
How to setup mandatory reviewers on github
This is what I know so far from my understanding of Github:
Github allows default reviewers whether it be for a specific type of file in any/certain location through the creation of the CODEOWNERS file.
Github allows the number of reviewers that…

DevopitionBro
- 111
- 1
- 6
5
votes
1 answer
Automatic merging of Dependabot generated Pull Request with codeowners file and branch protection rule?
I have created Workflow for GitHub Actions as described here: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions
name: Dependabot auto-approve
…

pixel
- 24,905
- 36
- 149
- 251
4
votes
1 answer
How to ignore a file in GitHub CODEOWNERS while still having a wildcard
I'm hoping this is a really simple answer I've overlooked, but I have a repo on GitHub using CODEOWNERS and would like to do the following:
# Default reviewers except for the subsequently listed things:
* @global-owner1 @global-owner2
# Some other…

robertwbradford
- 6,181
- 9
- 36
- 61
3
votes
1 answer
Exclude codeowners from dependabot PR
We use a codeowners file to automatically assign reviews to Pull Requests. We also have Dependabot creating PRs for major versions.
We do not want to automatically add reviews to the PRs created by Dependabot. According to…

Andreas Olsson
- 347
- 4
- 11
3
votes
0 answers
How to ignore CODEOWNERS on dev to master PR?
We are trying to automatically add our DevOps group as default PR reviewers whenever a PR to master is opened.
For this purpose, we have created a CODEOWNERS file in the master branch and added our DevOps group as reviewers.
If we create a…

Vlad
- 31
- 2
3
votes
1 answer
In a github organization, how can I find all the code owners which match a pattern?
In github, our organization has code-owners.
In the individual project I can
cat .github/CODEOWNERS
It says
# Code owners
* @ourorg/projectname
How can I find all git repositories for the same owner within this org? which is…

Phil
- 46,436
- 33
- 110
- 175
2
votes
1 answer
Configure CODEOWNERS for the Github Organization
There's a concept of the community health files but I don't see CODEOWNERS file among the list. Is there a mechanism to setup CODEOWNERS for (all repositories in the) Github Organisation?
I tried reading the docs but couldn't find the relevant info,…

Hammad Akhtar
- 177
- 12
2
votes
1 answer
Exclude a file or directory from CODEOWNERS
I have a file structure like so:
foo/file1.c
foo/file2.c
foo/freeforall.c
My foogroup on GitHub needs to review changes to everything in foo except freeforall.c which is a file that anyone can touch without restriction, so it should not…

Cory Klein
- 51,188
- 43
- 183
- 243
2
votes
1 answer
How to accept an invitation automatically to a GitHub repository?
Monthly I receive several invitations to be a collaborator of several Github repositories, unfortunately sometimes I miss the 7 days time to accept the invitations and as a consequence the invitations expire, making it impossible for me to access…
2
votes
1 answer
Add an Ignore file to github CODEOWNER
I have a simple repo that has branch protection / CODEOWNERs set to:
* @team
Is it possible to add a file / folder to CODEOWNER to make it be ignored?
Ive tried ! package.json and !package.json but both have made the CODEOWNERS file have an error.

Staggerlee011
- 847
- 2
- 13
- 23
2
votes
1 answer
CODEOWNERS syntax: /foobar/** vs /foobar/
Assuming I want to enforce on some directory (e.g. foobar) on my git repository hosted on GitHub a code owner. In the CODEOWNERS file I can specify:
/foobar/** @someuser
But also this would be possible:
/foobar/ @someuser
Is there any difference…

Vertexwahn
- 7,709
- 6
- 64
- 90
1
vote
0 answers
Ignore codeowners completely
I am looking to figure out if there is a way to ignore CODEOWNERS file (without really deleting the file itself) and stop auto tagging reviewers from CODEOWNERS file.
I disabled the check to "Require review from Code Owners" but did not have any…

AKS
- 11
- 2
1
vote
1 answer
github codeowners for each branch
Github says I can assign different code owners for different branch.
but how?
Is there any way for having different file for different branch without any conflict on merging??
please let me know how I can do…

laggu
- 19
- 2
1
vote
1 answer
Github branch protection questions and codeowners file
I have several questions on Github security
(1) For protected branches, is the Maintain Role, and the Admin role the only ones that can merge to it? I noticed Write can't do it.
(2) If I had a Team that had Maintain Access to my repo, why would I…

Jimmy Chen
- 207
- 5
- 12