auto approval

This commit is contained in:
mrT23
2024-02-06 08:31:36 +02:00
parent a126ef64fc
commit b190b1879e
8 changed files with 118 additions and 1 deletions

View File

@ -643,3 +643,13 @@ class GithubProvider(GitProvider):
return pr_id
except:
return ""
def auto_approve(self) -> bool:
try:
res = self.pr.create_review(event="APPROVE")
if res.state == "APPROVED":
return True
return False
except Exception as e:
get_logger().exception(f"Failed to auto-approve, error: {e}")
return False