File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff 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 issue in issues:
203+ issue.my_super_awesome_feature_flag = " random_value"
204+ issue.save()
205+
195206
196207 Base types
197208==========
Original file line number Diff line number Diff 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+
136147Subscribe / unsubscribe from an issue::
137148
138149 issue.subscribe()
You can’t perform that action at this time.
0 commit comments