Skip to content

Comments

Added CODEOWNERS file#741

Merged
nevoodoo merged 1 commit intomainfrom
SET-790-add-codeowners
Nov 17, 2025
Merged

Added CODEOWNERS file#741
nevoodoo merged 1 commit intomainfrom
SET-790-add-codeowners

Conversation

@nevoodoo
Copy link
Contributor

This change adds the CODEOWNERS config that ensure that a review is required from the software team for any changes being made to the codebase but allows the other teams to make changes to the scripts folder.

This change adds the CODEOWNERS config that ensure that a review is required
from the software team for any changes being made to the codebase.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a CODEOWNERS file to enforce code review requirements. The goal is to require software team approval for all codebase changes, while allowing the genomic-analysis-team to approve changes to the scripts folder independently. However, the current implementation has a pattern ordering issue that prevents it from working as intended.

  • Introduces CODEOWNERS file with two ownership rules
  • Sets software-team as default owners for all files
  • Attempts to set genomic-analysis-team as owners for scripts folder (but pattern ordering prevents this from working correctly)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +2
* @populationgenomics/software-team
/scripts/ @populationgenomics/genomic-analysis-team @populationgenomics/software-team
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order of patterns in CODEOWNERS is incorrect. In CODEOWNERS files, more specific patterns must be placed before more general patterns, otherwise they won't override the default.

Currently, line 1 (*) matches everything including /scripts/, so line 2's pattern is redundant. To achieve the stated goal where the genomic-analysis-team can approve changes in /scripts/ without requiring software-team approval, you should:

  1. Move the /scripts/ pattern to line 1
  2. Move the * pattern to line 2

Corrected order:

/scripts/ @populationgenomics/genomic-analysis-team
* @populationgenomics/software-team

This way, scripts folder changes only require genomic-analysis-team approval, while all other files require software-team approval.

Suggested change
* @populationgenomics/software-team
/scripts/ @populationgenomics/genomic-analysis-team @populationgenomics/software-team
/scripts/ @populationgenomics/genomic-analysis-team
* @populationgenomics/software-team

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this is wrong, the documentation here:
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
states that "Order is important; the last matching pattern takes the most precedence."

@nevoodoo nevoodoo merged commit 64fa86a into main Nov 17, 2025
13 of 16 checks passed
@nevoodoo nevoodoo deleted the SET-790-add-codeowners branch November 17, 2025 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants