mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 00:26:26 +00:00
fix(check_upstream_updates): compare template repo URL case-insensitively (#273)
GitHub serves repo paths case-insensitively, so a direct clone from https://github.com/madslorentzen/ai-job-search (lowercased) triggered the fork-vs-self warning even though origin is the template repo itself. Lowercase both sides of the check. New test clones with a lowercased URL: fails on the previous check, passes with this fix.
This commit is contained in:
@@ -85,7 +85,8 @@ def main() -> int:
|
||||
# A fork's own 'origin' can never reveal upstream updates: warn so the
|
||||
# user is not misled by the final '[OK]' line below. (Direct clones of
|
||||
# the template repo have origin == the upstream repo, so no warning.)
|
||||
if remote != args.remote and UPSTREAM_REPO_SLUG not in get_remote_url(remote):
|
||||
# GitHub serves repo paths case-insensitively, so compare lowercased.
|
||||
if remote != args.remote and UPSTREAM_REPO_SLUG.lower() not in get_remote_url(remote).lower():
|
||||
print(
|
||||
f"Warning: Remote '{remote}' does not point to the ai-job-search "
|
||||
f"template repo ({UPSTREAM_REPO_SLUG}), so this check compares your "
|
||||
|
||||
Reference in New Issue
Block a user