Closed thejcannon closed 1 year ago
It looks like you can use the GitHub compare commits endpoint without authentication:
% curl \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/pantsbuild/pants/compare/169d2e613cad7b1bd2593ae9e747100458bf2e5f...66edd8917f5c57b8ab0e36c88dc556142b321732 | grep \"status\"
"status": "behind",
That status
field will give either ahead
, behind
, or identical
. So you can check to see if the requested SHA is behind
the changeover commit, and in that case, use the old URL version.
Going to drop in favor of a symlink
See https://github.com/pantsbuild/pants/pull/17563 for the pants repo change.