From 6bdba8a2a561e9ea5d279273bd878ee4b3b1df78 Mon Sep 17 00:00:00 2001 From: Daham Navinda <96166776+DahamDev@users.noreply.github.com> Date: Wed, 24 May 2023 15:39:39 +0800 Subject: [PATCH] Adds features to specify the target pipeline type. --- atlassian/bitbucket/cloud/repositories/pipelines.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atlassian/bitbucket/cloud/repositories/pipelines.py b/atlassian/bitbucket/cloud/repositories/pipelines.py index 3cba12247..5cd46a63d 100644 --- a/atlassian/bitbucket/cloud/repositories/pipelines.py +++ b/atlassian/bitbucket/cloud/repositories/pipelines.py @@ -17,7 +17,7 @@ def __get_object(self, data): **self._new_session_args, ) - def trigger(self, branch="master", commit=None, pattern=None, variables=None): + def trigger(self, branch="master", type="custom", commit=None, pattern=None, variables=None): """ Trigger a new pipeline. The following options are possible (1 and 2 trigger the pipeline that the branch is associated with in the Pipelines @@ -48,7 +48,7 @@ def trigger(self, branch="master", commit=None, pattern=None, variables=None): } if commit is not None: data["target"]["commit"] = { - "type": "commit", + "type": type, "hash": commit, } if pattern is not None: