mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 05:10:38 +08:00
fixe bitbucket get_repo_settings bug
This commit is contained in:
@ -44,6 +44,8 @@ class BitbucketProvider(GitProvider):
|
|||||||
url = (f"https://api.bitbucket.org/2.0/repositories/{self.workspace_slug}/{self.repo_slug}/src/"
|
url = (f"https://api.bitbucket.org/2.0/repositories/{self.workspace_slug}/{self.repo_slug}/src/"
|
||||||
f"{self.pr.destination_branch}/.pr_agent.toml")
|
f"{self.pr.destination_branch}/.pr_agent.toml")
|
||||||
response = requests.request("GET", url, headers=self.headers)
|
response = requests.request("GET", url, headers=self.headers)
|
||||||
|
if response.status_code == 404: # not found
|
||||||
|
return ""
|
||||||
contents = response.text.encode('utf-8')
|
contents = response.text.encode('utf-8')
|
||||||
return contents
|
return contents
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Reference in New Issue
Block a user