Skip to content

Commit

Permalink
model_replay: skip report if no PR associated with the branch (commaa…
Browse files Browse the repository at this point in the history
…i#33866)

* no pr number

* better

* test

* cleanup
  • Loading branch information
maxime-desroches authored Oct 24, 2024
1 parent 719c634 commit a8908b5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions selfdrive/test/process_replay/model_replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ def comment_replay_report(proposed, master, full_logs):
PR_BRANCH = os.getenv("GIT_BRANCH","")
DATA_BUCKET = f"model_replay_{PR_BRANCH}"

try:
GITHUB.get_pr_number(PR_BRANCH)
except Exception:
print("No PR associated with this branch. Skipping report.")
return

files = generate_report(proposed, master, tmp)

GITHUB.upload_files(DATA_BUCKET, [(x[0], tmp + '/' + x[0]) for x in files])
Expand Down

0 comments on commit a8908b5

Please sign in to comment.