Use stable URLs for patch-diff GitHub patches (#30953)

This commit is contained in:
Adam J. Stewart
2022-06-02 09:52:05 -07:00
committed by GitHub
parent 2bda10edb5
commit 5728ba0122
3 changed files with 6 additions and 5 deletions

View File

@@ -298,7 +298,8 @@ def _check_build_test_callbacks(pkgs, error_cls):
def _check_patch_urls(pkgs, error_cls):
"""Ensure that patches fetched from GitHub have stable sha256 hashes."""
github_patch_url_re = (
r"^https?://github\.com/.+/.+/(?:commit|pull)/[a-fA-F0-9]*.(?:patch|diff)"
r"^https?://(?:patch-diff\.)?github(?:usercontent)?\.com/"
".+/.+/(?:commit|pull)/[a-fA-F0-9]*.(?:patch|diff)"
)
errors = []