pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python-gitlab/python-gitlab/blob/refs/heads/main/docs/gl_objects/labels.rst

rossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-f825c0edd7ad57f8.css" /> python-gitlab/docs/gl_objects/labels.rst at refs/heads/main · python-gitlab/python-gitlab · GitHub
Skip to content

Latest commit

 

History

History
93 lines (63 loc) · 2.25 KB

File metadata and controls

93 lines (63 loc) · 2.25 KB

Labels

Project labels

Reference

Examples

List labels for a project:

labels = project.labels.list(get_all=True)

Create a label for a project:

label = project.labels.create({'name': 'foo', 'color': '#8899aa'})

Update a label for a project:

# change the name of the label:
label.new_name = 'bar'
label.save()
# change its color:
label.color = '#112233'
label.save()

Promote a project label to a group label:

label.promote()

Delete a label for a project:

project.labels.delete(label_id)
# or
label.delete()

Manage labels in issues and merge requests:

# Labels are defined as lists in issues and merge requests. The labels must
# exist.
issue = p.issues.create({'title': 'issue title',
                         'description': 'issue description',
                         'labels': ['foo']})
issue.labels.append('bar')
issue.save()

Label events

Resource label events keep track about who, when, and which label was added or removed to an issuable.

Group epic label events are only available in the EE edition.

Reference

Examples

Get the events for a resource (issue, merge request or epic):

events = resource.resourcelabelevents.list(get_all=True)

Get a specific event for a resource:

event = resource.resourcelabelevents.get(event_id)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy