Skip to content

Commit 8ad2a19

Browse files
authored
[BITBUCKET] fix Bitbucket.get_pull_requests_contain_commit (#826)
* Bitbucket: request pull requests containing a commit on the correct URL
1 parent 5d3e894 commit 8ad2a19

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

atlassian/bitbucket/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2028,8 +2028,11 @@ def get_commit_info(self, project_key, repository_slug, commit, path=None):
20282028
params["path"] = path
20292029
return self.get(url, params=params)
20302030

2031+
def _url_commit_pull_requests(self, project_key, repository_slug, commit_id):
2032+
return "{}/pull-requests".format(self._url_commit(project_key, repository_slug, commit_id))
2033+
20312034
def get_pull_requests_contain_commit(self, project_key, repository_slug, commit):
2032-
url = self._url_commit(project_key, repository_slug, commit)
2035+
url = self._url_commit_pull_requests(project_key, repository_slug, commit)
20332036
return (self.get(url) or {}).get("values")
20342037

20352038
def get_changelog(self, project_key, repository_slug, ref_from, ref_to, start=0, limit=None):

0 commit comments

Comments
 (0)