Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Begin using CODEOWNERS in this repo #1220

Closed
gene1wood opened this issue Apr 12, 2019 · 13 comments
Closed

Begin using CODEOWNERS in this repo #1220

gene1wood opened this issue Apr 12, 2019 · 13 comments

Comments

@gene1wood
Copy link
Member

gene1wood commented Apr 12, 2019

https://help.github.com/en/articles/about-code-owners

Given that we have different groups of people working on different parts of the codebase (e.g. @andrewkrug and I working on CI/CD), if we define a CODEOWNERS file and then enable merging to follow that file, I can for example merge a change to CI/CD that doesn't affect the MozDef codebase without requiring @pwnbus to review and merge.

I wanted to see if this sounded ok before PRing a file for CODEOWNERS.

This would potentially have a section like

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# These users will be requested for
# review when someone opens a pull request.
*       @jeffbryner @pwnbus @mpurzynski @Phrozyn @tristanweir

# Require review by gene or andrew for cloudy MozDef stuff
/cloudy_mozdef/ @gene1wood @andrewkrug

Then we'd uncheck Restrict who can push to matching branches
And add a check to Require review from Code Owners

This way

  • nothing could be merged without review
  • the people required for review for everything other than cloudy mozdef would be the same list of people who can merge today
  • the people required for review of cloudy mozdef would be andrew and I

Thoughts @jeffbryner @pwnbus @mpurzynski @Phrozyn @tristanweir?

@gene1wood gene1wood changed the title Beging using CODEOWNERS in this repo Begin using CODEOWNERS in this repo Apr 15, 2019
@andrewkrug
Copy link
Contributor

It would also be nice if everyone could update the README and Documentation.

@gene1wood
Copy link
Member Author

So maybe something like

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# These users will be requested for
# review when someone opens a pull request.
*       @jeffbryner @pwnbus @mpurzynski @Phrozyn @tristanweir

# Require review by gene or andrew for cloudy MozDef stuff
/cloudy_mozdef/ @gene1wood @andrewkrug

# Anyone in EIS can modify documentation
README.md    @mozilla/enterprise-information-security
/docs/    @mozilla/enterprise-information-security

@tristanweir
Copy link
Contributor

I think this is a great approach. I agree that /docs and README are fine to be permissive.

I assume
* @jeffbryner @pwnbus @mpurzynski @Phrozyn @tristanweir
means those users have the ability to review anything? I would think this would be a good failsafe for the cloudy mozdef stuff because if @gene1wood PRs something and @andrewkrug is on PTO, Gene might want someone else to review for a quick merge.

More on CODEOWNERS https://help.github.com/en/articles/about-code-owners (I was unfamiliar with the feature)

@gene1wood
Copy link
Member Author

I assume * @jeffbryner @pwnbus @mpurzynski @Phrozyn @tristanweir
means those users have the ability to review anything?

Yes

@pwnbus
Copy link
Contributor

pwnbus commented Apr 25, 2019

I think this makes sense to do.

@tristanweir
Copy link
Contributor

I wanted to see if this sounded ok before PRing a file for CODEOWNERS.

@gene1wood PR away!

@Phrozyn
Copy link
Contributor

Phrozyn commented Apr 26, 2019

Sounds good!

gene1wood added a commit to gene1wood/MozDef that referenced this issue Apr 26, 2019
@gene1wood
Copy link
Member Author

Once #1237 is merged we'll want to change the branch protection settings

@gene1wood
Copy link
Member Author

Then we'd uncheck Restrict who can push to matching branches
And add a check to Require review from Code Owners

@gene1wood
Copy link
Member Author

Looks like we've got the Require review from Code Owners checked but we still need to uncheck the Restrict who can push to matching branches

@pwnbus
Copy link
Contributor

pwnbus commented Apr 30, 2019

I unchecked the "Restrict who can push to matching branches" so we should be all set?

@pwnbus
Copy link
Contributor

pwnbus commented Apr 30, 2019

Tristan had added you and Andrew to the list of folks that can merge code, so based on our discussion, I think we want to have "Restrict who can push to matching branches" in addition to having "Require review from Code Owners" checked.

@gene1wood
Copy link
Member Author

We'll need to keep in mind going forward then that the controls for who can modify various files in the MozDef codebase is controlled by the intersection of the reviewers defined in CODEOWNERS and the users who have merge permissions.

If we want to modify CODEOWNERS to grant someone else rights to modify some aspect of the code (by approving a PR) we'll need to also add them to the list of users with rights to merge.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants