From 32df75c6e3a96b4db27343c575bac7d999cf4f1a Mon Sep 17 00:00:00 2001 From: maslyaev Date: Fri, 7 Mar 2025 01:14:23 +0300 Subject: [PATCH] Add project webhook --- atlassian/bitbucket/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/atlassian/bitbucket/__init__.py b/atlassian/bitbucket/__init__.py index b9f4aa291..28c0b304c 100644 --- a/atlassian/bitbucket/__init__.py +++ b/atlassian/bitbucket/__init__.py @@ -1458,7 +1458,10 @@ def disable_repo_hook_settings(self, project_key, repository_slug, hook_key): return self.delete(url) def _url_webhooks(self, project_key, repository_slug): - return "{}/webhooks".format(self._url_repo(project_key, repository_slug)) + if repository_slug is None: + return "{}/webhooks".format(self._url_project(project_key)) + else: + return "{}/webhooks".format(self._url_repo(project_key, repository_slug)) def get_webhooks( self,