Reject MRs if people don't belong to specific group

Bug #1134428 reported by Sergio Schvezov
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
jenkins-launchpad-plugin
New
High
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:
https://launchpad.net/~contributor-agreement-canonical

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:
------------------lp:unity-------------------------------------
revno: 3191 [merge]
author: Jacob Edwards
committer: Tarmac
branch nick: trunk
timestamp: Wed 2013-03-06 13:33:18 +0000
message:
  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: https://bugs.launchpad.net/bugs/929485.

  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. https://bazaar.launchpad.net/~tarmac/tarmac/main/view/head:/tarmac/plugins/allowedcontributors.py

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.