@@ -1233,7 +1233,20 @@ def create(self, data: dict[str, Any] | None = None, **kwargs: Any) -> ProjectFo
|
1233 | 1233 | |
1234 | 1234 | |
1235 | 1235 | class ProjectRemoteMirror(ObjectDeleteMixin, SaveMixin, RESTObject): |
1236 | | -pass |
| 1236 | +@cli.register_custom_action(cls_names="ProjectRemoteMirror") |
| 1237 | +@exc.on_http_error(exc.GitlabCreateError) |
| 1238 | +def sync(self, **kwargs: Any) -> dict[str, Any] | requests.Response: |
| 1239 | +"""Force push mirror update. |
| 1240 | + |
| 1241 | + Args: |
| 1242 | + **kwargs: Extra options to send to the server (e.g. sudo) |
| 1243 | + |
| 1244 | + Raises: |
| 1245 | + GitlabAuthenticationError: If authentication is not correct |
| 1246 | + GitlabCreateError: If the server cannot perform the request |
| 1247 | + """ |
| 1248 | +path = f"{self.manager.path}/{self.encoded_id}/sync" |
| 1249 | +return self.manager.gitlab.http_post(path, **kwargs) |
1237 | 1250 | |
1238 | 1251 | |
1239 | 1252 | class ProjectRemoteMirrorManager( |
|