1

In Github CODEOWNERS, I want to set a rule for "directories that contains the word <TEAM_NAME>".

I assume it'd be something like this if possible: src/**<TEAM_NAME>**/**


For example, if I have such directory structure:

src/
  index.js
  features/
    auth/
    sales-feature1/
    sales-feature2/
    marketing-feature1/
    marketing-feature2/
    marketing-feature3/
  utils/
    sales-util1/
    sales-util2/

I want to set CODEOWNERS like:

src/**sales**/**   @github-sales-team

Which will apply to the below files

src/features/sales-feature1/**
src/features/sales-feature2/**
src/utils/sales-util1/**
src/utils/sales-util2/*

Question: What to set for src/**sales**/** to achieve this?

Audwin Oyong
  • 2,247
  • 3
  • 15
  • 32
Ziwon
  • 589
  • 6
  • 15

1 Answers1

0

Seems CODEOWNERS follows .gitigonore rule with some exceptions

And the following link from other is helpful

When to use ** (double star) in glob syntax within JAVA

gitignore rule

exception rule in CODEOWNERS file

mar-rak
  • 19
  • 3
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 17 '22 at 13:27
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/31079926) – SherylHohman Feb 21 '22 at 05:28