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

Misleading documentation:mr_id instead ofmr_iid #2295

Closed
Labels
@stdedos

Description

@stdedos

Description of the problem, including code/CLI snippet

Get a single MR::
mr = project.mergerequests.get(mr_id)
Create a MR::
mr = project.mergerequests.create({'source_branch': 'cool_feature',
'target_branch': 'main',
'title': 'merge cool feature',
'labels': ['label1', 'label2']})
Update a MR::
mr.description = 'New description'
mr.labels = ['foo', 'bar']
mr.save()
Change the state of a MR (close or reopen)::
mr.state_event = 'close' # or 'reopen'
mr.save()
Delete a MR::
project.mergerequests.delete(mr_id)
# or
mr.delete()

"Most probably", here the author meantmr_iid andnotmr_id (i.e. the project-agnostic ID).

If those are the only two instances, I'd open an MR to fix them now - but I'm thinking whether this a more widespread issue that I wouldn't know how to fix 😕

Expected Behavior

Actual Behavior

Specifications

  • python-gitlab version:
  • API version you are using (v3/v4):
  • Gitlab server version (or gitlab.com):

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