Skip to content

Generalise Proxy Mode Registry Config#149

Merged
Sahilb315 merged 3 commits intomainfrom
refactor/proxy-interceptor
Feb 3, 2026
Merged

Generalise Proxy Mode Registry Config#149
Sahilb315 merged 3 commits intomainfrom
refactor/proxy-interceptor

Conversation

@Sahilb315
Copy link
Contributor

@Sahilb315 Sahilb315 commented Feb 3, 2026

Copilot AI review requested due to automatic review settings February 3, 2026 07:17
@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.73%. Comparing base (28c7b6c) to head (622bfa3).

Files with missing lines Patch % Lines
proxy/interceptors/npm_registry.go 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #149      +/-   ##
==========================================
+ Coverage   37.37%   37.73%   +0.36%     
==========================================
  Files          84       84              
  Lines        5108     5117       +9     
==========================================
+ Hits         1909     1931      +22     
+ Misses       3022     3009      -13     
  Partials      177      177              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional flags.

Open in Devin Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Generalizes the registry configuration and URL parsing abstractions so registry interceptors can share common config/matching logic, and updates the NPM interceptor + parser to use the new interfaces.

Changes:

  • Added shared registry config types (registryConfig, registryConfigMap) and parser/package-info interfaces.
  • Refactored NPM registry interceptor and URL parser to use the new shared abstractions.
  • Updated NPM URL parser tests to validate behavior via the new packageInfo interface.

Reviewed changes

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

Show a summary per file
File Description
proxy/interceptors/registry_config.go Introduces shared registry config + hostname matching helpers for reuse across ecosystems.
proxy/interceptors/npm_url_parser.go Refactors NPM parsing to return a generic packageInfo and renames GitHub-related parsers to NPM-specific types.
proxy/interceptors/npm_url_parser_test.go Updates tests to validate via interface getters and new parser type names.
proxy/interceptors/npm_registry.go Switches NPM interceptor to use registryConfigMap lookup and generic parsing interface.
proxy/interceptors/npm_registry_config.go Removes NPM-specific config type/lookup in favor of shared registry config logic.

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

@safedep
Copy link

safedep bot commented Feb 3, 2026

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

This report is generated by SafeDep Github App

@Sahilb315 Sahilb315 requested a review from abhisek February 3, 2026 07:41
@Sahilb315 Sahilb315 enabled auto-merge (squash) February 3, 2026 07:46
@Sahilb315 Sahilb315 merged commit f90fa0e into main Feb 3, 2026
14 checks passed
@Sahilb315 Sahilb315 deleted the refactor/proxy-interceptor branch February 3, 2026 07:47
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.

4 participants