Skip to content

Commit

Permalink
Set total_comments output if split_workflow is true
Browse files Browse the repository at this point in the history
Allows to set up the workflow to fail during the review stage instead
of posting stage if there are comments.
  • Loading branch information
BUYT-1 committed Sep 4, 2023
1 parent f411633 commit fbd415d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions post/clang_tidy_review/clang_tidy_review/review.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ def main():
save_metadata(args.pr)

if args.split_workflow:
total_comments = 0 if review is None else len(review["comments"])
set_output("total_comments", total_comments)
print("split_workflow is enabled, not posting review")
return

Expand Down

0 comments on commit fbd415d

Please sign in to comment.