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

Commit792cee9

Browse files
authored
Merge pull request#2022 from MichaelSweikata/feat/documentation-update
docs: update issue example and extend API usage docs
2 parents1e22790 +aad71d2 commit792cee9

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

‎docs/api-usage.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,17 @@ You can print a Gitlab Object. For example:
192192
# Or explicitly via `pformat()`. This is equivalent to the above.
193193
print(project.pformat())
194194
195+
You can also extend the object if the parameter isn't explicitly listed. For example,
196+
if you want to update a field that has been newly introduced to the Gitlab API, setting
197+
the value on the object is accepted:
198+
199+
..code-block::python
200+
201+
issues= project.issues.list(state='opened')
202+
for issuein issues:
203+
issue.my_super_awesome_feature_flag="random_value"
204+
issue.save()
205+
195206
196207
Base types
197208
==========

‎docs/gl_objects/issues.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ Delete an issue (admin or project owner only)::
133133
# pr
134134
issue.delete()
135135

136+
137+
Assign the issues::
138+
139+
issue = gl.issues.list()[0]
140+
issue.assignee_ids = [25, 10, 31, 12]
141+
issue.save()
142+
143+
..note::
144+
The Gitlab API explicitly references that the `assignee_id` field is deprecated,
145+
so using a list of user IDs for `assignee_ids` is how to assign an issue to a user(s).
146+
136147
Subscribe / unsubscribe from an issue::
137148

138149
issue.subscribe()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp