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

GitlabHttpError(400) when making changes to existing merge request #325

Closed
Labels
@tomascapek

Description

@tomascapek

I have obtained object ofgitlab.v4.objects.ProjectMergeRequest and I am trying to do some changes in given merge request - for instance, I am trying to close it:
mr = gitlab.v4.objects.Project.mergerequests.list()[0]

mr.state_event = 'close'mr.save()

But atsave() I got following exception:

Traceback (most recent call last):  File "/home/tomas_capek/.virtualenvs/mrobot-latest/lib/python3.6/site-packages/gitlab/exceptions.py", line 239, in wrapped_f    return f(*args, **kwargs)  File "/home/tomas_capek/.virtualenvs/mrobot-latest/lib/python3.6/site-packages/gitlab/mixins.py", line 222, in update    return self.gitlab.http_put(path, post_data=data, **kwargs)  File "/home/tomas_capek/.virtualenvs/mrobot-latest/lib/python3.6/site-packages/gitlab/__init__.py", line 821, in http_put    post_data=post_data, **kwargs)  File "/home/tomas_capek/.virtualenvs/mrobot-latest/lib/python3.6/site-packages/gitlab/__init__.py", line 700, in http_request    response_body=result.content)gitlab.exceptions.GitlabHttpError: 400: b'{"error":"labels is invalid"}'

This code worked flawlessly with version 1.0.0.

Since this problem is related to labels (and according to the change log there was some changes in those in the latest release), on given merge request, there is only one label present. I haven't tried this on merge request with multiple or none labels, because I discovered it in a production environment, by an accident.

Metadata

Metadata

Assignees

No one assigned

    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