Skip to content

Feature - Added route:loops for detecting redirect loops in routes#127

Open
mattsinagra-upsun wants to merge 3 commits into
upsun:mainfrom
mattsinagra-upsun:feature-route-detection
Open

Feature - Added route:loops for detecting redirect loops in routes#127
mattsinagra-upsun wants to merge 3 commits into
upsun:mainfrom
mattsinagra-upsun:feature-route-detection

Conversation

@mattsinagra-upsun

Copy link
Copy Markdown

Feature - Added route:loops for detecting loops within path specified routes.yaml files, repo routes.yaml files or config.yaml route sections to check for routing loops

… routes.yaml files, repo routes.yaml files or config.yaml route sections to check for routing loops
Copilot AI review requested due to automatic review settings July 13, 2026 05:52

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.

Pull request overview

Adds a new route:loops CLI command and supporting library code to detect redirect loops across Platform.sh/Upsun route configurations (local YAML or live via route:list).

Changes:

  • Introduces internal/routeloops package for parsing routes from YAML/CSV and detecting redirect cycles.
  • Adds route:loops command with text/JSON output, local-file discovery, and --live support.
  • Registers the new command in the root command set and in the list command’s augmented output.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
internal/routeloops/routeloops.go Core redirect-cycle detection + URL normalization logic.
internal/routeloops/parse.go Parsers for routes.yaml/Upsun config + local project discovery + live CSV parsing.
internal/routeloops/routeloops_test.go Unit tests for detection, normalization, and parsing/discovery helpers.
commands/route_loops.go New route:loops cobra command, output formatting, and route loading paths.
commands/root.go Registers the new cobra command.
commands/list.go Adds route:loops to the enhanced list output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/routeloops/routeloops_test.go
Comment thread internal/routeloops/parse.go
Comment thread internal/routeloops/routeloops.go Outdated
Comment thread commands/route_loops.go
Comment thread commands/route_loops.go
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.

2 participants