model_replay: skip report if no PR associated with the branch (#33866)

* no pr number

* better

* test

* cleanup
pull/33867/head
Maxime Desroches 6 months ago committed by GitHub
parent 719c634668
commit a8908b5c08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      selfdrive/test/process_replay/model_replay.py

@ -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])

Loading…
Cancel
Save