|
61 | 61 | 'all': {},
|
62 | 62 | 'starred': {},
|
63 | 63 | 'star': {'required': ['id']},
|
64 |
| - 'unstar': {'required': ['id']}}, |
| 64 | + 'unstar': {'required': ['id']}, |
| 65 | + 'archive': {'required': ['id']}, |
| 66 | + 'unarchive': {'required': ['id']}, |
| 67 | + 'share': {'required': ['id', 'group-id', 'group-access']}}, |
65 | 68 | gitlab.User: {'block': {'required': ['id']},
|
66 | 69 | 'unblock': {'required': ['id']},
|
67 | 70 | 'search': {'required': ['query']},
|
@@ -205,6 +208,27 @@ def do_project_unstar(self, cls, gl, what, args):
|
205 | 208 | except Exception as e:
|
206 | 209 | _die("Impossible to unstar project (%s)" % str(e))
|
207 | 210 |
|
| 211 | + def do_project_archive(self, cls, gl, what, args): |
| 212 | + try: |
| 213 | + o = self.do_get(cls, gl, what, args) |
| 214 | + o.archive_() |
| 215 | + except Exception as e: |
| 216 | + _die("Impossible to archive project (%s)" % str(e)) |
| 217 | + |
| 218 | + def do_project_unarchive(self, cls, gl, what, args): |
| 219 | + try: |
| 220 | + o = self.do_get(cls, gl, what, args) |
| 221 | + o.unarchive_() |
| 222 | + except Exception as e: |
| 223 | + _die("Impossible to unarchive project (%s)" % str(e)) |
| 224 | + |
| 225 | + def do_project_share(self, cls, gl, what, args): |
| 226 | + try: |
| 227 | + o = self.do_get(cls, gl, what, args) |
| 228 | + o.share(args['group_id'], args['group_access']) |
| 229 | + except Exception as e: |
| 230 | + _die("Impossible to share project (%s)" % str(e)) |
| 231 | + |
208 | 232 | def do_user_block(self, cls, gl, what, args):
|
209 | 233 | try:
|
210 | 234 | o = self.do_get(cls, gl, what, args)
|
|
0 commit comments