Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ProjectMergeRequest.merge(): invalid keyword #285

Closed
@dmerejkowsky

Description

@dmerejkowsky

The code looks like this (both for v3 and v4):

defmerge(self,merge_commit_message=None,should_remove_source_branch=False,merged_when_build_succeeds=False,**kwargs):"""Accept the merge request. """...

The issue is that when you call:

mr.merge(merged_when_build_succeeds=True)

The MR is merged immediately,without waiting for the pipeline to finish, which is not what is expected.

The problem is that he argument is calledmerge_when_build_succeeds (note: noed at the end ofmerge) inv3 andmerge_when_pipeline_succeeds inv4.

Good news is that the fix is trivial:

gl=gitlab.Gitlab("http://example.com",'token',api_version=4)project=gl.projects.get("foo/bar")mr=project.mergerequests.list(iid=42)[0]mr.merge(merge_when_pipeline_succeeds=True)

I can make a pull request in the documentation if you like until there is a proper fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp