[viable strict] don't try to push nonexistent commit (#81226)
Issues like https://github.com/pytorch/pytorch/runs/7271166135?check_suite_focus=true shouldn't happen!
This used to not pop up with @swang392's OG implementation, but now that the script returns None, we should add an if.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81226
Approved by: https://github.com/seemethere, https://github.com/swang392, https://github.com/malfet