diff --git a/pr_agent/git_providers/codecommit_provider.py b/pr_agent/git_providers/codecommit_provider.py index 5361f665..8bd1aedd 100644 --- a/pr_agent/git_providers/codecommit_provider.py +++ b/pr_agent/git_providers/codecommit_provider.py @@ -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. diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index 2214f3b6..41f0b781 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -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)