Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] requiredApprovals in globalPaths for supported vcs #1608

Open
matray opened this issue Aug 7, 2024 · 2 comments
Open

[feature] requiredApprovals in globalPaths for supported vcs #1608

matray opened this issue Aug 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@matray
Copy link

matray commented Aug 7, 2024

Is your feature request related to a problem? Please describe.

It would be nice to support requiredApprovals in codeowner global paths!

Describe the solution you'd like

Since this will require wrapping each file in a section (at least for gitlab), perhaps the following makes sense

$schema: 'https://moonrepo.dev/schemas/workspace.json'
projects:
  - 'apps/*'
  - 'packages/*'
vcs:
  defaultBranch: main
  provider: "gitlab"
codeowners:
  syncOnRun: true
  requiredApprovals: 1
  globalPaths:
   'example': ['@app-example']

which creates

[example][1]
example @app-example

However, it's not as configurable on a per-path basis. So either there would need to be a way to express that via a union type like so or a way to "append always" some sort of raw codeowner stanza (ugly)

$schema: 'https://moonrepo.dev/schemas/workspace.json'
projects:
  - 'apps/*'
  - 'packages/*'
vcs:
  defaultBranch: main
  provider: "gitlab"
codeowners:
  syncOnRun: true
  globalPaths:
   'example': 
      groups: ['@app-example']
      requiredApprovals: 1

Describe alternatives you've considered
Adding a lifecycle hook somehow after moon runs (with codeowner sync on run turned on), or, disabling codeowner syncing entirely to self manage.

Additional context

@matray matray added the enhancement New feature or request label Aug 7, 2024
@milesj
Copy link
Collaborator

milesj commented Sep 2, 2024

Added to codeowners in 1.28. Need to figure out the per path still.

@matray
Copy link
Author

matray commented Sep 3, 2024

You’re a beast! Will try it out with an upgrade to our tooling this week! Per-path was just a nice to have idea, no immediate need for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants