/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/propose/github.py

  • Committer: Jelmer Vernooij
  • Date: 2019-01-03 00:18:35 UTC
  • mfrom: (0.431.66 trunk)
  • mto: This revision was merged to the branch mainline in revision 7239.
  • Revision ID: jelmer@jelmer.uk-20190103001835-j9hdqbz70tp2ks84
Merge support for merge proposal status.

Show diffs side-by-side

added added

removed removed

Lines of Context:
251
251
    def iter_instances(cls):
252
252
        yield cls()
253
253
 
254
 
    def iter_my_proposals(self):
255
 
        for issue in self.gh.search_issues(
256
 
                query='is:pr is:open author:%s' % self.gh.get_user().login):
 
254
    def iter_my_proposals(self, status='open'):
 
255
        query = ['is:pr']
 
256
        if status == 'open':
 
257
            query.append('is:open')
 
258
        elif status == 'closed':
 
259
            # Note that we don't use is:closed here, since that also includes
 
260
            # merged pull requests.
 
261
            query.append('is:unmerged')
 
262
        elif status == 'merged':
 
263
            query.append('is:merged')
 
264
        query.append('author:%s' % self.gh.get_user().login)
 
265
        for issue in self.gh.search_issues(query=' '.join(query)):
257
266
            yield GitHubMergeProposal(issue.as_pull_request())
258
267
 
259
268