FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: API Doc Updates by MichaelSweikata · Pull Request #2025 · python-gitlab/python-gitlab · GitHub

Repository navigation

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 10 additions & 0 deletions docs/api-usage.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@ 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 deletions docs/gl_objects/issues.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff 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

Back | FazBrowse Home | New Git URL