Skip to content

Add Chocolatey ecosystem support#1623

Open
andrew wants to merge 1 commit into
mainfrom
chocolatey-ecosystem
Open

Add Chocolatey ecosystem support#1623
andrew wants to merge 1 commit into
mainfrom
chocolatey-ecosystem

Conversation

@andrew
Copy link
Copy Markdown
Member

@andrew andrew commented May 7, 2026

Adds support for indexing Windows packages from the Chocolatey community repository.

Uses the NuGet v2 OData feed at community.chocolatey.org/api/v2:

  • FindPackagesById()?id='name' for per-package metadata, following <link rel="next"> to collect all versions
  • Packages()?$filter=IsLatestVersion&$select=Id with skiptoken pagination for the full name list (server hard-caps pages at 40 entries, so ~250 requests for ~10k packages on a full sync)
  • feeds.feedburner.com/chocolatey for recently updated (the OData $orderby parameter is rejected by this server)

Maps ProjectSourceUrl → repository_url with ProjectUrl fallback, Tags → keywords, DownloadCount → downloads (max across version entries since the latest entry sometimes reports 0), PackageHash → integrity. Dependencies are parsed from the OData name:range:framework|... string format. purl type is chocolatey, install command is choco install NAME --version=X.

The OData $count endpoint caps at 10000 so the true package count may be higher; skiptoken pagination walks past that regardless.

To enable in production:

Registry.find_or_create_by(name: 'community.chocolatey.org', url: 'https://community.chocolatey.org', ecosystem: 'chocolatey', github: 'chocolatey', default: true).sync_all_packages_async

Closes #1617

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.

Add support for Chocolatey packages

1 participant