/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/gitlabs.py

Add allow-collaboration flag.

Merged from https://code.launchpad.net/~jelmer/brz/allow-collaboration/+merge/380390

Show diffs side-by-side

added added

removed removed

Lines of Context:
588
588
 
589
589
    def create_proposal(self, description, reviewers=None, labels=None,
590
590
                        prerequisite_branch=None, commit_message=None,
591
 
                        work_in_progress=False):
 
591
                        work_in_progress=False, allow_collaboration=False):
592
592
        """Perform the submission."""
593
593
        # https://docs.gitlab.com/ee/api/merge_requests.html#create-mr
594
594
        if prerequisite_branch is not None:
600
600
        title = determine_title(description)
601
601
        if work_in_progress:
602
602
            title = 'WIP: %s' % title
603
 
        # TODO(jelmer): Allow setting allow_collaboration field
604
603
        # TODO(jelmer): Allow setting milestone field
605
604
        # TODO(jelmer): Allow setting squash field
606
605
        kwargs = {
609
608
            'target_project_id': target_project['id'],
610
609
            'source_branch_name': self.source_branch_name,
611
610
            'target_branch_name': self.target_branch_name,
612
 
            'description': description}
 
611
            'description': description,
 
612
            'allow_collaboration': allow_collaboration}
613
613
        if labels:
614
614
            kwargs['labels'] = ','.join(labels)
615
615
        if reviewers: