Skip to content

Commit

Permalink
bitbucket - use non deprecated methods to get pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
koenigle committed Jul 16, 2024
1 parent 7f2ca0a commit 98b6500
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitopscli/git_api/bitbucket_git_repo_api_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def merge_pull_request(
_merge_method: Literal["squash", "rebase", "merge"] = "merge",
_merge_parameters: dict[str, Any] | None = None,
) -> None:
pull_request = self.__bitbucket.get_pullrequest(self.__organisation, self.__repository_name, pr_id)
pull_request = self.__bitbucket.get_pull_request(self.__organisation, self.__repository_name, pr_id)
self.__bitbucket.merge_pull_request(
self.__organisation,
self.__repository_name,
Expand Down Expand Up @@ -125,7 +125,7 @@ def get_branch_head_hash(self, branch: str) -> str:
return str(branches[0]["latestCommit"])

def get_pull_request_branch(self, pr_id: int) -> str:
pull_request = self.__bitbucket.get_pullrequest(self.__organisation, self.__repository_name, pr_id)
pull_request = self.__bitbucket.get_pull_request(self.__organisation, self.__repository_name, pr_id)
if "errors" in pull_request:
raise GitOpsException(pull_request["errors"][0]["message"])
return str(pull_request["fromRef"]["displayId"])
Expand Down

0 comments on commit 98b6500

Please sign in to comment.