fixe bitbucket get_repo_settings bug

This commit is contained in:
mrT23
2023-11-06 08:15:43 +02:00
parent bb2760ae41
commit 8fc663911f

View File

@ -44,6 +44,8 @@ class BitbucketProvider(GitProvider):
url = (f"https://api.bitbucket.org/2.0/repositories/{self.workspace_slug}/{self.repo_slug}/src/"
f"{self.pr.destination_branch}/.pr_agent.toml")
response = requests.request("GET", url, headers=self.headers)
if response.status_code == 404: # not found
return ""
contents = response.text.encode('utf-8')
return contents
except Exception: