| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -192,6 +192,17 @@ You can print a Gitlab Object. For example: | |||
| 192 | 192 | # Or explicitly via `pformat()`. This is equivalent to the above. | |
| 193 | 193 | print(project.pformat()) | |
| 194 | 194 | ||
| 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 | + | ||
| 195 | 206 | ||
| 196 | 207 | Base types | |
| 197 | 208 | ========== | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -133,6 +133,17 @@ Delete an issue (admin or project owner only):: | |||
| 133 | 133 | # pr | |
| 134 | 134 | issue.delete() | |
| 135 | 135 | ||
| 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 | + | ||
| 136 | 147 | Subscribe / unsubscribe from an issue:: | |
| 137 | 148 | ||
| 138 | 149 | issue.subscribe() | |
| Back | FazBrowse Home | New Git URL |
0 commit comments