/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: 2020-02-21 03:58:42 UTC
  • mfrom: (7490.3.4 work)
  • mto: This revision was merged to the branch mainline in revision 7495.
  • Revision ID: jelmer@jelmer.uk-20200221035842-j97r6b74q8cgxb21
merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
            return json.loads(response.text)
276
276
        raise InvalidHttpResponse(path, response.text)
277
277
 
278
 
    def _create_pull(self, path, title, head, base, body=None, labels=None, assignee=None):
 
278
    def _create_pull(self, path, title, head, base, body=None, labels=None, assignee=None, draft=False):
279
279
        data = {
280
280
            'title': title,
281
281
            'head': head,
282
282
            'base': base,
 
283
            'draft': draft,
283
284
        }
284
285
        if labels is not None:
285
286
            data['labels'] = labels
373
374
 
374
375
    def publish_derived(self, local_branch, base_branch, name, project=None,
375
376
                        owner=None, revision_id=None, overwrite=False,
376
 
                        allow_lossy=True):
 
377
                        allow_lossy=True, tag_selector=None):
377
378
        base_owner, base_project, base_branch_name = parse_github_branch_url(base_branch)
378
379
        base_repo = self._get_repo(base_owner, base_project)
379
380
        if owner is None:
393
394
        try:
394
395
            push_result = remote_dir.push_branch(
395
396
                local_branch, revision_id=revision_id, overwrite=overwrite,
396
 
                name=name)
 
397
                name=name, tag_selector=tag_selector)
397
398
        except errors.NoRoundtrippingSupport:
398
399
            if not allow_lossy:
399
400
                raise
400
401
            push_result = remote_dir.push_branch(
401
402
                local_branch, revision_id=revision_id,
402
 
                overwrite=overwrite, name=name, lossy=True)
 
403
                overwrite=overwrite, name=name, lossy=True,
 
404
                tag_selector=tag_selector)
403
405
        return push_result.target_branch, github_url_to_bzr_url(
404
406
            remote_repo['html_url'], name)
405
407