2

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, hence seeking help from the community.

Sridhar Ratnakumar
  • 81,433
  • 63
  • 146
  • 187
Hammad Akhtar
  • 177
  • 12

1 Answers1

-2

The "About code owners" page does mention that you can define code owners in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server.

When the code owner is a team, that team must be visible and it must have write permissions, even if all the individual members of the team already have write permissions directly, through organization membership, or through another team membership.

CODEOWNERS file location

To use a CODEOWNERS file, create a new file called CODEOWNERS in the root, docs/, or .github/ directory of the repository, in the branch where you'd like to add the code owners.

Each CODEOWNERS file assigns the code owners for a single branch in the repository. Thus, you can assign different code owners for different branches, such as @octo-org/codeowners-team for a code base on the default branch and @octocat for a GitHub Pages site on the gh-pages branch.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I think this is for a repo but it's not possible to do so for the github organization. – Hammad Akhtar Mar 22 '23 at 12:34
  • 1
    @HammadAkhtar It does say "you can define code owners in public repositories with GitHub Free and GitHub Free **for organizations**". But yes, this is repository per repository inside the organization. – VonC Mar 22 '23 at 12:38