OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.49k stars 6.5k forks source link

[REQ][repo] Use CODEOWNERS #4177

Open snebjorn opened 4 years ago

snebjorn commented 4 years ago

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

The PR Checklist states

Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

This step can be automated using CODEOWNERS making it easier for everyone 👯‍♂

Describe the solution you'd like

By placing CODEOWNERS file in the .github folder language specific people/teams can be auto assigned to review PRs in their field of expertise.

Here's an example/start

# Core
/modules/* @OpenAPITools/generator-core-team
/modules/openapi-generator-cli/ @OpenAPITools/generator-core-team
/modules/openapi-generator-core/ @OpenAPITools/generator-core-team
/modules/openapi-generator-gradle-plugin/ @OpenAPITools/generator-core-team
/modules/openapi-generator-maven-plugin/ @OpenAPITools/generator-core-team
/modules/openapi-generator-online/ @OpenAPITools/generator-core-team

# TypeScript Clients
## folders
**/*typescript*/** @TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny @nicokoenig @topce @akehir
## files
**/*TypeScript* @TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny @nicokoenig @topce @akehir
**/*typescript* @TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny @nicokoenig @topce @akehir

Additional context

I don't have access to https://github.com/OpenAPITools/teams so I can't tell if each language or client have a separate team. If there is then it might be a good idea to use them.

I also don't know to whom every file should be assigned so I have assumed that files and folders called something with {LANG} belongs to the respective technical committee, everything else is Core.

jimschubert commented 4 years ago

This is a great idea, although GitHub's CODEOWNERS requires repo write permissions, which not all technical committee members have. From the link you've provided:

The people you choose as code owners must have write permissions for the repository.

The feature to have CODEOWNERS without write permissions was only recently added to GitHub's backlog

We could create a CODEOWNERS and assign the teams and community leaders with write permissions (~19 total people), but I don't think that addresses the concern in its entirety.

I wonder if it might be better to either do a little research on existing apps or write our own as we've done with auto-labeler, and create a CODEREVIEWERS file which works in exactly the same way as CODEOWNERS but just tags/assigns the teams or users for review and does not require review before merge.

jirikuncar commented 4 years ago

This is a great idea, although GitHub's CODEOWNERS requires repo write permissions, which not all technical committee members have.

@jimschubert what about adding write permissions to the technical committee members but protecting who can merge to branches to @OpenAPITools/generator-core-team only?

jimschubert commented 4 years ago

That wouldn't work because it would allow those with write access to create branches and do some other things.

GitHub have added the "Triage" permission. I can see if this adds automatic review via CODEOWNERS, even though it's not a documented use case on CODEOWNERS.

jimschubert commented 4 years ago

GitHub kinda silently introduced a Triage access role last year (see https://github.blog/changelog/2019-05-23-triage-and-maintain-roles-beta/), and I'd only noticed this in settings about a month ago. We could try adding triage access for some technical committee members and see if reviewers are automatically applied.

@OpenAPITools/generator-core-team what do you all think? Could we try this out with someone who is fairly active from a technical committee such as @ybelenko or @chameleon82 (if they agree)?

DanielHabenicht commented 2 years ago

You could also use a bot for this or a github action as this suggests: https://github.com/home-assistant/probot-home-assistant/tree/master/src/plugins/CodeOwnersMention Hit me up if you are interested. I could convert it to an action.