diff --git a/pull_requests.py b/pull_requests.py index f636b61..03b3586 100644 --- a/pull_requests.py +++ b/pull_requests.py @@ -92,7 +92,7 @@ def process_pull(repo: Repository, pr: PullRequest, dataset: Dataset, repos_dir: diffs_after = {file.filename: file.patch for file in repo.compare(first_commit.sha, last_commit.sha).files} entry = DatasetEntry( - metadata=Metadata(repo.full_name, pr.number, pr.merge_commit_sha, commented_file_path), + metadata=Metadata(repo.full_name, pr.number, pr.merge_commit_sha, commented_file_path, reason_for_failure="Was still processing while the program crashed / was stopped"), files={file.filename: FileData(file.filename) for file in pr.get_files()}, diffs_before=diffs_before, comment=comment_text, @@ -165,6 +165,8 @@ def process_pull(repo: Repository, pr: PullRequest, dataset: Dataset, repos_dir: build_handler.clean_repo() reset_repo_to_latest_commit(repo_path) + if entry.metadata.successful: + entry.metadata.reason_for_failure = "" # was set to 'still processing', since it's done being processed and was successful, there are no reasons for failure dataset.to_json(args.output)