Skip to content

Fix badges for dotted project names - #1526

Merged
skyfallwastaken merged 1 commit into
mainfrom
fix/dotted-project-badges
Aug 6, 2026
Merged

Fix badges for dotted project names#1526
skyfallwastaken merged 1 commit into
mainfrom
fix/dotted-project-badges

Conversation

@skyfallwastaken

@skyfallwastaken skyfallwastaken commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary of the problem

Badge URLs for projects whose repository names contain dots return Project not found. Rails interprets the final portion after the dot as a response format, so pimlico/pimlico.dev reaches the controller as project pimlico/pimlico with format dev.

Fixes #1488.

Describe your changes

  • Disable optional format parsing on the wildcard project badge route so dotted project names remain intact.
  • Add a request regression spec covering a dotted repository path and its project mapping.

Screenshots / Media

N/A

Copilot AI review requested due to automatic review settings August 5, 2026 13:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes project badge routing for repository names containing dots by disabling Rails format parsing on the wildcard route.

  • Preserves the complete dotted repository path in params[:project].
  • Adds a request regression spec that exercises repository mapping and verifies a successful shields.io redirect.

Confidence Score: 5/5

The PR appears safe to merge, with a focused route correction and regression coverage for the reported failure.

The route now preserves dotted wildcard values, and the new request spec verifies that the full owner/repository path resolves through its mapping to a valid shields.io redirect.

Important Files Changed

Filename Overview
config/routes.rb Disables optional format extraction on the wildcard badge route so dotted project names remain intact.
spec/requests/api/v1/badges_spec.rb Adds a focused regression test whose success depends on preserving and resolving the complete dotted repository name.

Reviews (1): Last reviewed commit: "Fix badges for dotted project names" | Re-trigger Greptile

@skyfallwastaken
skyfallwastaken merged commit c215c4a into main Aug 6, 2026
20 checks passed
@skyfallwastaken
skyfallwastaken deleted the fix/dotted-project-badges branch August 6, 2026 08:37
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.

Time spent working on project buttons don't work if your project name has a dot in it

2 participants