~jelmer/brz/byov-trunk

« back to all changes in this revision

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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-03-07 15:17:55 UTC
  • mfrom: (7496.1.2 trunk-merge-3.0)
  • Revision ID: breezy.the.bot@gmail.com-20200307151755-b5g0v8o9r80qhmp5
Merge the lp:brz/3.1 branch.

Merged from https://code.launchpad.net/~jelmer/brz/trunk-merge-3.1/+merge/380392

Show diffs side-by-side

added added

removed removed

Lines of Context:
583
583
 
584
584
    def create_proposal(self, description, reviewers=None, labels=None,
585
585
                        prerequisite_branch=None, commit_message=None,
586
 
                        work_in_progress=False):
 
586
                        work_in_progress=False, allow_collaboration=False):
587
587
        """Perform the submission."""
588
588
        # https://docs.gitlab.com/ee/api/merge_requests.html#create-mr
589
589
        if prerequisite_branch is not None:
595
595
        title = determine_title(description)
596
596
        if work_in_progress:
597
597
            title = 'WIP: %s' % title
598
 
        # TODO(jelmer): Allow setting allow_collaboration field
599
598
        # TODO(jelmer): Allow setting milestone field
600
599
        # TODO(jelmer): Allow setting squash field
601
600
        kwargs = {
604
603
            'target_project_id': target_project['id'],
605
604
            'source_branch_name': self.source_branch_name,
606
605
            'target_branch_name': self.target_branch_name,
607
 
            'description': description}
 
606
            'description': description,
 
607
            'allow_collaboration': allow_collaboration}
608
608
        if labels:
609
609
            kwargs['labels'] = ','.join(labels)
610
610
        if reviewers: