mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 20:30:41 +08:00
Add context-aware git provider retrieval and refactor related functions
This commit is contained in:
@ -46,9 +46,10 @@ class GithubProvider(GitProvider):
|
|||||||
self.incremental = incremental
|
self.incremental = incremental
|
||||||
if self.incremental.is_incremental:
|
if self.incremental.is_incremental:
|
||||||
self.unreviewed_files_set = dict()
|
self.unreviewed_files_set = dict()
|
||||||
self.get_incremental_commits()
|
self._get_incremental_commits()
|
||||||
self.last_commit_id = self.pr_commits[-1]
|
self.last_commit_id = self.pr_commits[-1]
|
||||||
|
|
||||||
|
|
||||||
def is_supported(self, capability: str) -> bool:
|
def is_supported(self, capability: str) -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -59,7 +60,7 @@ class GithubProvider(GitProvider):
|
|||||||
self.repo, self.pr_num = self._parse_pr_url(pr_url)
|
self.repo, self.pr_num = self._parse_pr_url(pr_url)
|
||||||
self.pr = self._get_pr()
|
self.pr = self._get_pr()
|
||||||
|
|
||||||
def get_incremental_commits(self):
|
def _get_incremental_commits(self):
|
||||||
if not self.pr_commits:
|
if not self.pr_commits:
|
||||||
self.pr_commits = list(self.pr.get_commits())
|
self.pr_commits = list(self.pr.get_commits())
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user