Skip to content

Add RTD Denver transit support - #1

Open
jbriones95 wants to merge 1 commit into
CJFData:pico-transitfrom
jbriones95:feature/rtd-denver
Open

Add RTD Denver transit support#1
jbriones95 wants to merge 1 commit into
CJFData:pico-transitfrom
jbriones95:feature/rtd-denver

Conversation

@jbriones95

Copy link
Copy Markdown

Summary

  • Add RTD Denver to the agency picker with static GTFS and GTFS-realtime feeds.
  • Use RTD's current canonical TripUpdate and VehiclePosition endpoints.
  • Resolve relative redirects in static and realtime feed clients while preserving HTTPS-only behavior.
  • Update supported-agency documentation.

Validation

  • Verified the downloaded RTD GTFS archive contains valid agency, routes, trips, stops, stop_times, and calendar data.
  • Verified RTD static and realtime URLs respond successfully.
  • ./gradlew :tool:assembleDebug could not complete because GitHub Maven credentials are unavailable for com.thelightphone.lp3keyboard:ui:0.0.16.,workdir

Copilot AI lite review requested due to automatic review settings August 5, 2026 16:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds RTD Denver as a supported transit agency (static GTFS + GTFS-realtime) and updates the feed clients to correctly resolve relative redirects while maintaining HTTPS-only behavior.

Changes:

  • Add RTD Denver to GtfsAgency with static and realtime feed endpoints.
  • Update GTFS static and GTFS-RT clients to resolve relative redirects (via URI.resolve).
  • Update README documentation to include RTD Denver in the supported agency list.

Reviewed changes

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

Show a summary per file
File Description
tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsRealtime.kt Resolves redirect targets (including relative) for GTFS-RT fetches while enforcing HTTPS-only.
tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsIngestor.kt Resolves redirect targets (including relative) for GTFS zip HEAD/GET while enforcing HTTPS-only.
tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsAgency.kt Adds RTD Denver static + realtime endpoint URLs to the agency enum.
tool/README.md Documents RTD Denver as a supported agency.
README.md Documents RTD Denver as a supported agency.

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

Comment on lines +186 to +194
/** Resolves absolute and relative redirects while never following a redirect back to plain HTTP. */
private fun secureRealtimeRedirectUrl(currentUrl: String, location: String): String {
val resolved = URI(currentUrl).resolve(location).toString()
return if (resolved.startsWith("http://")) {
"https://" + resolved.removePrefix("http://")
} else {
resolved
}
}
Comment on lines +195 to +203
/** Resolves absolute and relative redirects while never following a redirect back to plain HTTP. */
private fun secureRedirectUrl(currentUrl: String, location: String): String {
val resolved = URI(currentUrl).resolve(location).toString()
return if (resolved.startsWith("http://")) {
"https://" + resolved.removePrefix("http://")
} else {
resolved
}
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hey Jose! Does this change resolve the HTTP:// vs HTTPS:// issues for other agencies aswell? before I merge the change, I'd like to confirm that RIPTA will still work with these changes (HTTP:// Realtime feed)

@CJFData CJFData self-assigned this Aug 6, 2026
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.

3 participants