Repository navigation
fix: pub.dev per-version changelogs and public-only GitHub repositories - #12
Merged
Merged
Conversation
The package changelog page on pub.dev shows only the CHANGELOG of the latest upload, so every older version whose entry was dropped from that file was stored with empty notes. Each version's page keeps the file it was published with; the package page stays the fallback. The entry is now matched on the exact version, so 1.2.0 no longer takes the entry of 1.2.0+1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The GitHub token may see private repositories, so release notes and changelog files of a private repository could be read and published. Before anything is read, the repository is checked through the API and only a public one is used; the answer is cached for six hours. A repository that is private, missing or not an owner/repo URL is no longer stored on the package, so the page shows no link to it and the trust lookup does not use it. The check runs again on every metadata refresh, so a repository that turns public is picked up again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pub.dev release notes are read from each version's own changelog page, and a GitHub repository is only used (for notes, the repository link and the trust lookup) when the API confirms it is public.
Why
virusis_api_client_ngon pub.dev has a note for every version, but pkgdiff stored all of them empty./packages/<name>/changelogrenders only the CHANGELOG of the latest upload; older versions' notes live on/packages/<name>/versions/<version>/changelog.virusis_api_clientdeclares an organization URL (https://github.com/virusis-company/). The GitHub token may be able to read private repositories, so their release notes and changelog files could be scraped and published. A private repository can also become public later, so the decision cannot be made once and stored for good.Changes
PubDevServicereads/versions/{version}/changelogfirst and falls back to the package changelog page. The heading must name the exact version (1.2.0no longer matches1.2.0+1or1.2.0-dev).GitHubScraperServicechecksGET /repos/{owner}/{repo}before reading releases, changelog files, release files or milestones. Only"private": falsecounts as public; 404 or a URL without owner/repo counts as not usable. The answer is cached for 6 hours. When the check fails and a token is configured, nothing is read for now. Without a token, nothing private is reachable, so no check is made.PackageCacheServicestores a GitHub URL only when it is not known to be private or missing. This applies to new packages, to every metadata refresh (so a repository that turns public comes back) and to repositories found while scraping (PackageAnalysisService). With no stored URL, the package page hides the repository link and "View on GitHub", and the trust lookup falls back to the project URL.Notes for reviewers
virusis_api_client_ngrows are corrected with a separate one-off SQL update.Checklist
developand is about one thingfeat(scope): ...,fix(scope): ...)src/frontend/src/app/core/models