Skip to content

Set git-pkgs user agent on registries calls - #224

Merged
andrew merged 1 commit into
mainfrom
fix/registries-user-agent
Jun 3, 2026
Merged

andrew merged 1 commit into
mainfrom
fix/registries-user-agent

Conversation

@andrew

@andrew andrew commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Two call sites passed a nil client to the registries package and got the library default User-Agent of registries:

  • cmd/urls.go:61 — registries.New(purlType, "", nil)
  • cmd/deprecated.go:140 — registries.BulkFetchVersions(ctx, misses, nil)

Both now pass registries.NewClient().WithUserAgent("git-pkgs/"+version), matching the git-pkgs/<version> UA used by every other outbound call (enrichment, OSV).

Two call sites in cmd/urls.go and cmd/deprecated.go passed a nil client
to the registries package, falling back to the library default User-Agent
of "registries". Pass a client configured with the same
"git-pkgs/<version>" UA used by every other outbound call.
@andrew
andrew merged commit 36a6072 into main Jun 3, 2026
7 checks passed
@andrew andrew changed the title Set git-pkgs user agent on registries calls User agent hygiene for outbound HTTP Jun 3, 2026
@andrew andrew changed the title User agent hygiene for outbound HTTP Set git-pkgs user agent on registries calls Jun 3, 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.

1 participant