Merge lp:~jelmer/brz/propose-close into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/propose-close
Merge into: lp:brz
Diff against target: 42 lines (+10/-0)
3 files modified
breezy/plugins/propose/github.py (+3/-0)
breezy/plugins/propose/gitlabs.py (+4/-0)
breezy/plugins/propose/launchpad.py (+3/-0)
To merge this branch: bzr merge lp:~jelmer/brz/propose-close
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+362564@code.launchpad.net

Description of the change

Implement .close on merge proposals for {launchpad,github,gitlab}.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Thanks! (Should really be tests for these.)

review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/plugins/propose/github.py'
--- breezy/plugins/propose/github.py 2019-01-04 00:40:55 +0000
+++ breezy/plugins/propose/github.py 2019-01-31 23:31:35 +0000
@@ -122,6 +122,9 @@
122 def is_merged(self):122 def is_merged(self):
123 return self._pr.merged123 return self._pr.merged
124124
125 def close(self):
126 self._pr.edit(state='closed')
127
125128
126def parse_github_url(branch):129def parse_github_url(branch):
127 url = urlutils.split_segment_parameters(branch.user_url)[0]130 url = urlutils.split_segment_parameters(branch.user_url)[0]
128131
=== modified file 'breezy/plugins/propose/gitlabs.py'
--- breezy/plugins/propose/gitlabs.py 2019-01-04 00:40:55 +0000
+++ breezy/plugins/propose/gitlabs.py 2019-01-31 23:31:35 +0000
@@ -163,6 +163,10 @@
163 def is_merged(self):163 def is_merged(self):
164 return (self._mr.state == 'merged')164 return (self._mr.state == 'merged')
165165
166 def close(self):
167 self._mr.state_event = 'close'
168 self._mr.save()
169
166170
167def gitlab_url_to_bzr_url(url, name):171def gitlab_url_to_bzr_url(url, name):
168 if not PY3:172 if not PY3:
169173
=== modified file 'breezy/plugins/propose/launchpad.py'
--- breezy/plugins/propose/launchpad.py 2019-01-28 21:02:24 +0000
+++ breezy/plugins/propose/launchpad.py 2019-01-31 23:31:35 +0000
@@ -141,6 +141,9 @@
141 def set_description(self, description):141 def set_description(self, description):
142 self._mp.description = description142 self._mp.description = description
143143
144 def close(self):
145 self._mp.setStatus(status='Rejected')
146
144147
145class Launchpad(Hoster):148class Launchpad(Hoster):
146 """The Launchpad hosting service."""149 """The Launchpad hosting service."""

Subscribers

People subscribed via source and target branches