mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 12:50:38 +08:00
Add null check
This commit is contained in:
@ -543,6 +543,10 @@ class GiteaProvider(GitProvider):
|
||||
self.logger.error("Failed to get PR branch")
|
||||
return ""
|
||||
|
||||
if not self.pr.head:
|
||||
self.logger.error("PR head not found")
|
||||
return ""
|
||||
|
||||
return self.pr.head.ref if self.pr.head.ref else ""
|
||||
|
||||
def get_pr_description_full(self) -> str:
|
||||
|
Reference in New Issue
Block a user