mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 20:30:41 +08:00
Add null check
This commit is contained in:
@ -542,6 +542,10 @@ class GiteaProvider(GitProvider):
|
||||
if not self.pr:
|
||||
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 ""
|
||||
|
||||
|
Reference in New Issue
Block a user