sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.27k forks source link

Support split batch changes by CODEOWNERS #21683

Open sluongng opened 3 years ago

sluongng commented 3 years ago

Feature request description

In batch changes, it would be nice to be able to split the changes into multiple PR/MR/CR based on the CODEOWNERS configured in the repository for easier review / approval.

Is your feature request related to a problem? If so, please describe.

In a big complicated multi-tenants repository, directory is not a good boundary of ownership that can be used as the basis of code review / approval. Big source code hosting providers use different form of CODEOWNERS: Github has 1, Gitlab has a slightly more complicated syntax, Gerrit and k8s use OWNER yaml file.

It would be a lot better to have batch change split the PR/MR/CR based on owners for easier review/merge.

Describe alternatives you've considered.

Manual bash script. Or modifying fastmod to be aware of PR/MR and CODEOWERS workflow

Additional context

  1. https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners#codeowners-syntax
  2. https://docs.gitlab.com/ee/user/project/code_owners.html#the-syntax-of-code-owners-files
  3. https://www.kubernetes.dev/docs/guide/owners/#owners-spec
  4. https://gerrit.googlesource.com/plugins/owners/+/refs/tags/v1.0/README.md#gerrit-owners-plugin
github-actions[bot] commented 3 years ago

Hey, @sourcegraph/batchers (@eseliger @mrnugget @LawnGnome @malomarrec @chrispine @courier-new) - we have been mentioned. Let's take a look.