diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index f8b0dce7f..7adf82cc7 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -2624,7 +2624,9 @@ def trigger_pipeline(self, ref, token, variables={}, **kwargs): """ path = '/projects/%s/trigger/pipeline' % self.get_id() post_data = {'ref': ref, 'token': token, 'variables': variables} - self.manager.gitlab.http_post(path, post_data=post_data, **kwargs) + attrs = self.manager.gitlab.http_post( + path, post_data=post_data, **kwargs) + return ProjectPipeline(self.pipelines, attrs) @cli.register_custom_action('Project') @exc.on_http_error(exc.GitlabHousekeepingError)