Skip to content

Match template links to repositories ignoring case, as GitHub does - #227

Merged
matt-edmondson merged 1 commit into
mainfrom
claude/ktsubuild-163-template-link-case
Oct 8, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
claude/ktsubuild-163-template-link-case

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #163

What changed

TemplateLinks.FindRetired built its lookup with the default case-sensitive comparer. A working template link such as https://github.com/ktsu-dev/semantics therefore didn't match the repository Semantics. It was reported as "archived or no longer public", and ProfileGenerator.CheckTemplateLinksAsync failed the whole profile readme run. The lookup now uses StringComparer.OrdinalIgnoreCase, which matches how FindLinkedRepositories and GitHub itself treat names. This is the approved fix from the decision comment.

Tests

  • FindRetired_DoesNotFlagALinkInOtherCasing: this is the repro from the issue, a lower-case link to a live Semantics repo, and it expects no retired entries. It fails on main: I reverted the fix and saw it fail.
  • FindRetired_FlagsAnArchivedRepositoryLinkedInOtherCasing: an archived repository linked in different casing is still flagged, so ignoring case doesn't hide real offenders.
  • The full suite passes (766 tests). The local Sonar build reports nothing new; the S3267 at TemplateLinks.cs:39 was already there.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CzB8uCZc7DWCamHvE3Qk4k


Generated by Claude Code

FindRetired looked repositories up with a case-sensitive dictionary, so a
working link such as github.com/ktsu-dev/semantics was reported as archived
or no longer public, and the whole profile readme run failed. Look names up
with StringComparer.OrdinalIgnoreCase, as FindLinkedRepositories already does.

Fixes #163

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CzB8uCZc7DWCamHvE3Qk4k
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit 44af000 into main Oct 8, 2026
14 checks passed
@matt-edmondson
matt-edmondson deleted the claude/ktsubuild-163-template-link-case branch October 8, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

profile readme fails the whole run, calling a live repo "archived", when a template link differs from the repo name only by case

2 participants