lgtmco / lgtm

LGTM is a simple pull request approval system [ARCHIVE]
Apache License 2.0
988 stars 140 forks source link

Ability to customize team name #12

Open keithamus opened 8 years ago

keithamus commented 8 years ago

It can be a pain for teams with high turnover, or teams with lots of repositories, to maintain the MAINTAINERS file. Github and Bitbucket provide "teams" which allow project maintainers to set repository permissions - these teams could be used as a way to determine the maintainers of the code.

As an example, the ChaiJS project (https://github.com/chaijs) has a team for every repository (https://github.com/orgs/chaijs/teams) - if these could be used as a standin for maintaining a MAINTAINERS file this would ease the burden of working with LGTM.

bradrydzewski commented 8 years ago

this is already supported. See the bottom of https://lgtm.co/docs/maintainers/

keithamus commented 8 years ago

Oh cool! Thanks @bradrydzewski!

Sadly it looks like I can only have 1 team named Maintainers right? I'd like to be able to have different teams from different projects. Is this possible?

bradrydzewski commented 8 years ago

we have a placeholder in the .lgtm file to customize the team name but this is not currently being used.

right now the team name is hard-coded: https://github.com/lgtmco/lgtm/blob/master/remote/github/github.go#L104 https://github.com/lgtmco/lgtm/blob/master/remote/remote.go#L24

if the above functions are altered to pass the team name we could source the team name from the .lgtm file like this:

-members, merr := cache.GetMembers(c, user, repo.Owner)
+members, merr := cache.GetMembers(c, user, repo.Owner, rcfile.Team)

please note that I'm not actively working on feature requests. Lgtm meets my specific needs and I have to dedicate my time to drone/drone so any new features or enhancements will need to come from the community via pull request

keithamus commented 8 years ago

Great, thanks @bradrydzewski. I'll put some time into making a PR some point this week.

bradynpoulsen commented 8 years ago

+1 Is this being completed or could it use some help?

bradrydzewski commented 8 years ago

@bradynpoulsen help wanted :)

bradynpoulsen commented 8 years ago

@bradrydzewski Has this format been adopted? https://github.com/lgtmco/lgtm/issues/49#issuecomment-245525248

I'm not too familiar with the organization of the project, where do I find and example at getting values from the config (or the default if not configured)?

bradynpoulsen commented 8 years ago

Here is a pull request that is working on this https://github.com/lgtmco/lgtm/pull/50