/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-25 00:38:06 UTC
  • mfrom: (7490.3.5 work)
  • mto: (7490.40.19 work)
  • mto: This revision was merged to the branch mainline in revision 7516.
  • Revision ID: jelmer@jelmer.uk-20200225003806-7i1vt6f65ywyxqfy
Merge 3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
            return json.loads(response.text)
281
281
        raise InvalidHttpResponse(path, response.text)
282
282
 
283
 
    def _create_pull(self, path, title, head, base, body=None, labels=None, assignee=None):
 
283
    def _create_pull(self, path, title, head, base, body=None, labels=None, assignee=None, draft=False):
284
284
        data = {
285
285
            'title': title,
286
286
            'head': head,
287
287
            'base': base,
 
288
            'draft': draft,
288
289
        }
289
290
        if labels is not None:
290
291
            data['labels'] = labels
378
379
 
379
380
    def publish_derived(self, local_branch, base_branch, name, project=None,
380
381
                        owner=None, revision_id=None, overwrite=False,
381
 
                        allow_lossy=True):
 
382
                        allow_lossy=True, tag_selector=None):
382
383
        base_owner, base_project, base_branch_name = parse_github_branch_url(base_branch)
383
384
        base_repo = self._get_repo(base_owner, base_project)
384
385
        if owner is None:
398
399
        try:
399
400
            push_result = remote_dir.push_branch(
400
401
                local_branch, revision_id=revision_id, overwrite=overwrite,
401
 
                name=name)
 
402
                name=name, tag_selector=tag_selector)
402
403
        except errors.NoRoundtrippingSupport:
403
404
            if not allow_lossy:
404
405
                raise
405
406
            push_result = remote_dir.push_branch(
406
407
                local_branch, revision_id=revision_id,
407
 
                overwrite=overwrite, name=name, lossy=True)
 
408
                overwrite=overwrite, name=name, lossy=True,
 
409
                tag_selector=tag_selector)
408
410
        return push_result.target_branch, github_url_to_bzr_url(
409
411
            remote_repo['html_url'], name)
410
412