Revert D30731191: [pytorch][PR] Torchhub: rewrite commit hash check to avoid using unnecessary GitHub API credits
Test Plan: revert-hammer
Differential Revision:
D30731191 (https://github.com/pytorch/pytorch/commit/f9bf144a0c5e3627f5fafb256cebf1f02152ab0c)
Original commit changeset: d1ee7c2ef259
fbshipit-source-id: 5c7207f66c5354ce7b9ac2594e4f5b8307619b0c