mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 04:10:49 +08:00
add get_pr_id() to CodeCommitProvider
This commit is contained in:
@ -235,6 +235,18 @@ class CodeCommitProvider(GitProvider):
|
||||
def get_title(self):
|
||||
return self.pr.get("title", "")
|
||||
|
||||
def get_pr_id(self):
|
||||
"""
|
||||
Returns the PR ID in the format: "repo_name/pr_number".
|
||||
Note: This is an internal identifier for PR-Agent,
|
||||
and is not the same as the CodeCommit PR identifier.
|
||||
"""
|
||||
try:
|
||||
pr_id = f"{self.repo_name}/{self.pr_num}"
|
||||
return pr_id
|
||||
except:
|
||||
return ""
|
||||
|
||||
def get_languages(self):
|
||||
"""
|
||||
Returns a dictionary of languages, containing the percentage of each language used in the PR.
|
||||
|
@ -67,7 +67,7 @@ class PRDescription:
|
||||
try:
|
||||
logging.info(f"Generating a PR description {self.pr_id}")
|
||||
if get_settings().config.publish_output:
|
||||
self.git_provider.publish_comment("Preparing pr description...", is_temporary=True)
|
||||
self.git_provider.publish_comment("Preparing PR description...", is_temporary=True)
|
||||
|
||||
await retry_with_fallback_models(self._prepare_prediction)
|
||||
|
||||
|
Reference in New Issue
Block a user