Skip to content

Conversation

mbg
Copy link
Member

@mbg mbg commented Sep 4, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings September 4, 2025 14:53
@github-actions github-actions bot added the Go label Sep 4, 2025
Copy link
Contributor

@Copilot 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

This PR adds support for git_source type registry configurations in the Go extractor's proxy handling functionality. The change extends the existing registry proxy system to handle Git sources alongside the existing goproxy server support.

  • Adds git_source type support to registry configurations
  • Updates proxy environment variable handling to process Git sources
  • Adds comprehensive test coverage for multiple registry configurations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
go/extractor/util/registryproxy.go Adds git_source constant, refactors data structures to separate goproxy servers and Git sources, and updates environment variable handling logic
go/extractor/util/registryproxy_test.go Adds new test function to verify parsing of multiple registry configurations including both git_source and goproxy_server types

multiple := parseRegistryConfigsSuccess(t, "[{ \"type\": \"git_source\", \"url\": \"https://github.com/github\" }, { \"type\": \"goproxy_server\", \"url\": \"https://proxy.example.com/mod\" }]")

if len(multiple) != 2 {
t.Fatalf("Expected `parseRegistryConfigs` to return two configuration, but got %d.", len(multiple))
Copy link
Preview

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

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

The error message contains a grammatical error. 'two configuration' should be 'two configurations'.

Suggested change
t.Fatalf("Expected `parseRegistryConfigs` to return two configuration, but got %d.", len(multiple))
t.Fatalf("Expected `parseRegistryConfigs` to return two configurations, but got %d.", len(multiple))

Copilot uses AI. Check for mistakes.

@mbg mbg force-pushed the mbg/go/support-git-source branch 2 times, most recently from 6576e3b to 35ff9fd Compare September 5, 2025 19:35
@mbg mbg force-pushed the mbg/go/support-git-source branch from 35ff9fd to cb7a155 Compare September 5, 2025 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant