Reject MRs if people don't belong to specific group

Bug #1134428 reported by Sergio Schvezov
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Martin Mrazik

Bug Description

In the case of phablet, MRs need to come from folk external to Canonical in a specific group, that is, those who signed the Canonical Contributor Agreement. This might apply to all PS projects though, so it could be a default check.

The group is this one:

The proposal is to reject the MR and prevent autolanding if it comes from a launchpad user not in the group if they don't belong to Canonical.

information type: Public → Private
description: updated
Changed in jenkins-launchpad-plugin:
importance: Undecided → High
information type: Private → Public
Revision history for this message
Martin Mrazik (mrazik) wrote :

There won't be a great fix for this as I need to check if the person who proposed the code is in ~contributor-agreement-canonical _OR_ ~canonical. I can't check the later as it is a private team and ps-jenkins bot is not a member.
I'll try to add people manually and add canonical-product-strategy.

Changed in jenkins-launchpad-plugin:
assignee: nobody → Martin Mrazik (mrazik)
Revision history for this message
Martin Mrazik (mrazik) wrote :

And it gets more complicated than anticipated.

I assume we care about the real authors rather than the person who creates the merge proposal (it could be different people).
In that case there might be more than one author. Moreover these authors are usually identified by their mail address and full name. In some cases the mail is even missing:
revno: 3191 [merge]
author: Jacob Edwards
committer: Tarmac
branch nick: trunk
timestamp: Wed 2013-03-06 13:33:18 +0000
  Add a 1s delay between hovering on a launcher icon and showing its tooltip.
  Further tooltips before clicking or unhovering launcher will appear instantly. Fixes:

  Approved by PS Jenkins bot, Stephen M. Webb, Marco Trevisan (Treviño).

Given that I'm not really sure what to do. I can try to search for an e-mail (and fail if it doesn't exists) in launchpad to identify the launchpad id. And if any of the authors fail the screening the merge proposal would refuse to land.

We will probably hit some issues with this. When looking at lp:compiz there are branches where the author is <email address hidden> but such e-mail does not exist in launchpad anymore (OTOH it looks like he is not in the agreement group either).

Revision history for this message
dobey (dobey) wrote :

There is code in tarmac as a plug-in which already does this.

It allows specifying any team or person on launchpad in the tarmac.conf as an allowed contributor, on a per-target-branch basis.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers