Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait for github to update PR after a force push
Summary: This is trying to fix the exact same issue as described in D57741395. Except the mentioned diff failed to fully close the race. This diff fully closes the race by inserting a loop that waits for GH to acknowledge the force push. I've checked that the SHAs returned by the two libraries are indeed comparable: ``` >>> import github >>> g = github.Github() >>> repo = g.get_repo("PyGithub/PyGithub") >>> pr = repo.get_pull(2987) >>> pr.head.sha '294e68a3c605a58695c29e0982a620489956423e' >>> from git import Repo >>> r = Repo("~/dev/linux") >>> r.head.commit.hexsha '911edc69c832161b62a8ad10a6972290157a7bd3' ``` Reviewed By: anakryiko Differential Revision: D58542702 fbshipit-source-id: e446828c405aa4edb9b702f00bbd2c9f3671a7ce
- Loading branch information