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

docs: Update issue example and extend API usage#2022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletionsdocs/api-usage.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -192,6 +192,17 @@ You can print a Gitlab Object. For example:
# Or explicitly via `pformat()`. This is equivalent to the above.
print(project.pformat())

You can also extend the object if the parameter isn't explicitly listed. For example,
if you want to update a field that has been newly introduced to the Gitlab API, setting
the value on the object is accepted:

.. code-block:: python

issues = project.issues.list(state='opened')
for issue in issues:
issue.my_super_awesome_feature_flag = "random_value"
issue.save()


Base types
==========
Expand Down
11 changes: 11 additions & 0 deletionsdocs/gl_objects/issues.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -133,6 +133,17 @@ Delete an issue (admin or project owner only)::
# pr
issue.delete()


Assign the issues::

issue = gl.issues.list()[0]
issue.assignee_ids = [25, 10, 31, 12]
issue.save()

.. note::
The Gitlab API explicitly references that the `assignee_id` field is deprecated,
so using a list of user IDs for `assignee_ids` is how to assign an issue to a user(s).

Subscribe / unsubscribe from an issue::

issue.subscribe()
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp