diff --git a/atlassian/bitbucket/cloud/repositories/pipelines.py b/atlassian/bitbucket/cloud/repositories/pipelines.py index 905d62a5e..6cfc865f6 100644 --- a/atlassian/bitbucket/cloud/repositories/pipelines.py +++ b/atlassian/bitbucket/cloud/repositories/pipelines.py @@ -21,7 +21,7 @@ def trigger(self, branch="master", commit=None, pattern=None, variables=None): 1. Latest revision of a branch (specify ``branch``) 2. Specific commit on a branch (additionally specify ``commit``) - 3. Specific pipeline (additionally specify ``pattern``) + 3. Specific pipeline (additionally specify ``pattern``. ``commit`` is optional here) Variables has to be a list of dictionaries: @@ -48,8 +48,6 @@ def trigger(self, branch="master", commit=None, pattern=None, variables=None): "hash": commit, } if pattern is not None: - if commit is None: - raise ValueError("Missing argument [commit].") data["target"]["selector"] = { "type": "custom", "pattern": pattern,