From c22084c7ac32fd83f2189af8fe54971881fa6ebd Mon Sep 17 00:00:00 2001 From: mrT23 Date: Fri, 1 Dec 2023 11:56:03 +0200 Subject: [PATCH] feat: Add exception handling for missing previous review in github_provider.py --- pr_agent/git_providers/github_provider.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pr_agent/git_providers/github_provider.py b/pr_agent/git_providers/github_provider.py index 1fb85164..b8a13f37 100644 --- a/pr_agent/git_providers/github_provider.py +++ b/pr_agent/git_providers/github_provider.py @@ -60,6 +60,8 @@ class GithubProvider(GitProvider): get_logger().info(f"Skipping merge commit {commit.commit.message}") continue self.file_set.update({file.filename: file for file in commit.files}) + else: + raise ValueError("No previous review found") def get_commit_range(self): last_review_time = self.previous_review.created_at