Merge branch 'main' into hl/gitlab_fix

This commit is contained in:
Hussam Lawen
2023-07-14 22:48:13 +03:00
committed by GitHub
14 changed files with 155 additions and 24 deletions

View File

@ -28,8 +28,6 @@ class GithubProvider:
self.pr = self._get_pr()
def get_files(self):
if hasattr(self.pr, 'files'):
return self.pr.files
return self.pr.get_files()
def get_diff_files(self) -> list[FilePatchInfo]:
@ -42,6 +40,10 @@ class GithubProvider:
self.diff_files = diff_files
return diff_files
def publish_description(self, pr_title: str, pr_body: str):
self.pr.edit(title=pr_title, body=pr_body)
# self.pr.create_issue_comment(pr_comment)
def publish_comment(self, pr_comment: str, is_temporary: bool = False):
response = self.pr.create_issue_comment(pr_comment)
if hasattr(response, "user") and hasattr(response.user, "login"):