add a comment to an existing issue in gitlab

28 Views Asked by At

with that code I can create an issue in GitLab with python-gitlab

    issue = project.issues.create({'title': title, 'description': description})
    issue.labels = ['label1', 'label2']
    issue.assignee_ids = username
    issue.save()

I did not find any possibility to add a comment to an existing issue. Would that be possible ?

1

There are 1 best solutions below

0
user3732793 On BEST ANSWER

found it. It is actually a bit hidden because adding a comment is actually a notes create in the python library

issue.notes.create({"body": "some comment"})