public inbox for gentoo-dev-announce@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev-announce] GitHub mirror updates: dev/project syncing, pull request auto-assignment
@ 2016-11-23 13:20 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2016-11-23 13:20 UTC (permalink / raw
  To: gentoo-dev-announce; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2889 bytes --]

Hi, everyone.

Robin has given me some fresh inspiration to move our GitHub pull
request business a little bit forward, and today I've finished
deploying two new features: Gentoo org team syncing and pull request
auto-assignment.

The team syncing part means that we now have the automation to match
developers to their GitHub accounts, and create GitHub teams from
projects. The scripts are living in [1] (and require patched PyGithub
[2]). I'm currently running them manually but they can be eventually
put into a cronjob.

The developer syncing part obtains developer GitHub usernames from LDAP
(gentooGitHubUser attribute), and adds or removes the respective GitHub
users from the 'developers' team appropriately. Therefore, if you
haven't filled up your LDAP, please do so now:

  perl_ldap -C gentooGitHubUser <gh-username> <gentoo-username>

The project syncing part obtains all projects and their members from
projects.xml (generated from the Wiki), and updates the members of
respective GitHub teams appropriately. The projects are matched by
their e-mail user part, name or URL-name (i.e. a lot of guessing but
works for all of them currently). GitHub teams that don't match any
project are not altered.

As far as updates are concerned, only GitHub users that match developer
accounts are added to and removed from teams, i.e. you can add external
team members without worrying that the script will remove them.

The script is also capable of creating new teams. However, this
requires manual confirmation (and choice of team name).

Having full sync of GitHub organization members and project teams, I
have went ahead and implemented auto-assignment of pull requests.
The script runs every 4 minutes and assigns all pull requests that do
not have an explicit assignee, and do not have either 'assigned' or
'need assignment' labels.

The assignment is done based on in-::gentoo (not in pull-request!)
metadata.xml files, the LDAP mapping of developers and the projects.xml
mapping of projects. Pull requests regarding new packages
and maintainer-needed packages are special-cased for proxy-maint.
Pure eclass and profile changes are left for manual assignment. Pull
requests regarding packages that are maintained purely by developers
refusing to work with users on GitHub are left for manual assignment
as well.

The automatic assignment is also disabled if the pull request affects
packages with more than 5 unique sets of maintainers.

To prevent your pull request from being auto-assigned, either assign it
yourself or add an 'assigned' label. To have pull request re-assigned
after changing the contents, remove the assignee and/or 'assigned'
label.

[1]:https://github.com/mgorny/dev2github
[2]:https://github.com/PyGithub/PyGithub/pull/490

-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-23 17:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-23 13:20 [gentoo-dev-announce] GitHub mirror updates: dev/project syncing, pull request auto-assignment Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox