GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python-gitlab/docs/gl_objects/draft_notes.rst at main · netflash/python-gitlab

Expand file tree

/

draft_notes.rst

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
58 lines (34 loc) · 1.43 KB
/

draft_notes.rst

Copy path

File metadata and controls

58 lines (34 loc) · 1.43 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Draft Notes

Draft notes are pending, unpublished comments on merge requests. They can be either start a discussion, or be associated with an existing discussion as a reply. They are viewable only by the author until they are published.

Reference

  • v4 API:
    • :class:`gitlab.v4.objects.ProjectMergeRequestDraftNote`
    • :class:`gitlab.v4.objects.ProjectMergeRequestDraftNoteManager`
    • :attr:`gitlab.v4.objects.ProjectMergeRequest.draft_notes`
  • GitLab API: https://docs.gitlab.com/api/draft_notes

Examples

List all draft notes for a merge request:

draft_notes = merge_request.draft_notes.list(get_all=True)

Get a draft note for a merge request by ID:

draft_note = merge_request.draft_notes.get(note_id)

Warning

When creating or updating draft notes, you can provide a complex nested position argument as a dictionary. Please consult the upstream API documentation linked above for the exact up-to-date attributes.

Create a draft note for a merge request:

draft_note = merge_request.draft_notes.create({'note': 'note content'})

Update an existing draft note:

draft_note.note = 'updated note content'
draft_note.save()

Delete an existing draft note:

draft_note.delete()

Publish an existing draft note:

draft_note.publish()

Publish all existing draft notes for a merge request in bulk:

merge_request.draft_notes.bulk_publish()
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.