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

Add initial CODEOWNERS #3800

Merged
merged 3 commits into from
Apr 15, 2019
Merged

Add initial CODEOWNERS #3800

merged 3 commits into from
Apr 15, 2019

Conversation

ddbeck
Copy link
Collaborator

@ddbeck ddbeck commented Apr 9, 2019

The new governance doc (#3668) calls for a CODEOWNERS file:

The owners are also listed as top-level owners in GitHub’s code owner file.

This PR adds this, though we might might want to fill it out a bit more, unless we want every PR to request the owners' reviews

@ddbeck ddbeck added the docs Issues or pull requests regarding the documentation of this project. label Apr 9, 2019
@ddbeck ddbeck requested a review from Elchi3 April 9, 2019 13:52
@Elchi3
Copy link
Member

Elchi3 commented Apr 9, 2019

Thanks for this PR, I forgot to follow-up on this. (I thought it was a good idea at the time, but I haven't actually looked into this in much details. We should totally figure this out, or, if we can't, remove these references from the gov doc).

unless we want every PR to request the owners' reviews

We certainly don't want this. Not all owners/peers are doing reviews all the time. I don't think auto assigning reviews is generally useful.

I'm reading https://help.github.com/en/articles/about-code-owners. So, there isn't a way to disable automatic review assignment if we introduce a codeowner file? Or does this work by being more clever with the rules?

So far I could imagine these two rules for auto review assignment:

  • For webextensions/ assign Irene as a reviewer.
  • all files that aren't .json assign me as a reviewer.

I'd like to somehow state (in an owners file, I thought) that we have experts like Rachel for css/, but I'm not sure I want to auto-assign reviews to her, for example. As said in the governance PR, being a peer should not force you to do work.

Does all this make some sense? Or am I misunderstanding this whole codeowners concept? :)

@ddbeck
Copy link
Collaborator Author

ddbeck commented Apr 9, 2019

So, there isn't a way to disable automatic review assignment if we introduce a codeowner file?

I don't think we have to have a top-level, default CODEOWNERS entry (i.e., an initial * fallback). In other words, we can have some PRs which do not automatically have a reviewer requested. Also, even if there is an owner match, the review request is not (by default) obligatory—we can merge without a requested owner's review (that's a separate repo setting).

So far I could imagine these two rules for auto review assignment:

* For webextensions/ assign Irene as a reviewer.
* all files that aren't .json assign me as a reviewer.

I think we can do this with a CODEOWNERS file without having to request a review for every PR. But we would probably want to drop the text from the governance file pointing toward the CODEOWNERS file (or just it as a document—putting those owners' names in as comments).

@queengooborg
Copy link
Contributor

queengooborg commented Apr 13, 2019

Basically, what we’re looking for is the following:

webextensions/ @irenesmith
!*.json @Elchi3

Based upon what I’ve been reading, CODEOWNERS is a similar syntax to .gitignore files, so the ! should work, theoretically. It seems to choose the last match, so any non-JSON files in webextensions/ will not be assigned to Irene and only assigned to Elchi3.

@ddbeck
Copy link
Collaborator Author

ddbeck commented Apr 13, 2019

OK, I've updated the CODEOWNERS file to reflect @vinyldarkscratch's suggested syntax and added a comment referring to the governance doc. Rather than being a circular reference, I dropped the code owners line from the governance doc.

Copy link
Contributor

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

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

Looks perfect!

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

Thank you! 👍 Curious to see how this works out in practice.

@Elchi3 Elchi3 merged commit 346ff00 into mdn:master Apr 15, 2019
@ddbeck ddbeck deleted the add-codeowners branch April 15, 2019 15:32
@queengooborg
Copy link
Contributor

Hmm, it looks like it may not be functioning as expected. I reviewed a PR that altered the test files (JS files), and didn’t automatically add @Elchi3 for review. More research may be needed.

@ddbeck
Copy link
Collaborator Author

ddbeck commented Apr 18, 2019

Making a note here: PR #3933 is addressing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Issues or pull requests regarding the documentation of this project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants