public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: <gentoo-dev-announce@lists.gentoo.org>
Cc: <gentoo-dev@lists.gentoo.org>
Subject: [gentoo-dev] GitHub mirror updates: dev/project syncing, pull request auto-assignment
Date: Wed, 23 Nov 2016 14:20:47 +0100	[thread overview]
Message-ID: <20161123142047.57a30563.mgorny@gentoo.org> (raw)

[-- 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 --]

                 reply	other threads:[~2016-11-23 13:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161123142047.57a30563.mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev-announce@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox