Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/jenkins-jobs:debug-perm into ~snappy-hwe-team/snappy-hwe-snaps/+git/jenkins-jobs:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Konrad Zapałowicz
Approved revision: 3b928edcdb1ed11234e68c6ff740db46c2c2cd78
Merged at revision: a7a4e17dac9acde264bce10f2fa523b4b2823da5
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/jenkins-jobs:debug-perm
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/jenkins-jobs:master
Diff against target: 18 lines (+6/-1)
1 file modified
tools/automerge-mps.py (+6/-1)
Reviewer Review Type Date Requested Status
Konrad Zapałowicz (community) code Approve
Simon Fels Approve
System Enablement Bot continuous-integration Approve
Review via email: mp+326212@code.launchpad.net

Description of the change

automerge: do not fail due to lack of e-mail

If the registrant of the MP had not defined an e-mail in the launchpad
account, we were failing to merge.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

lgtm

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tools/automerge-mps.py b/tools/automerge-mps.py
2index 4f610a2..8699dd8 100755
3--- a/tools/automerge-mps.py
4+++ b/tools/automerge-mps.py
5@@ -86,7 +86,12 @@ def try_merge(proposal, target_repo, target_branch, source_repo, source_branch):
6 repo.git.config("user.email", "ce-system-enablement@lists.canonical.com")
7
8 registrant_name = proposal.registrant.display_name
9- registrant_mail = proposal.registrant.preferred_email_address.email
10+ try:
11+ registrant_mail = proposal.registrant.preferred_email_address.email
12+ except Exception as e:
13+ print("WARNING: cannot get e-mail for %s (%s)" % (registrant_name, e))
14+ registrant_mail="(unknown e-mail)"
15+
16 repo.git.merge("--no-ff",
17 "-m", "Merge remote tracking branch %s" % (source_branch),
18 "-m", "Merge-Proposal: %s" % proposal.web_link,

Subscribers

People subscribed via source and target branches