Repository navigation
feat(admin): tell admins when a new PaGetto release is available - #120
Merged
Merged
Conversation
ReleaseCheckService looks up the latest GitHub release of letreset/PaGetto at startup and then once a day. The admin pages show a notice under their tabs, with a link to the release notes, while that release is newer than the running version. Prereleases are not offered. The request carries no version, credentials or cookies, only the user agent GitHub requires. Without network access the check fails silently (a debug log line) and keeps the release found before. UpdateCheck:Enabled (default true) turns it off; the test host turns it off so tests never contact GitHub. Closes #109
A Release check section in the configuration docs (what is sent, how to turn it off), the notice on the admin pages in the web UI and upgrading docs, the UpdateCheck key in AGENTS.md and a UI check for the notice.
The footer padded outside its 1200px box while the header and the page content pad inside it, so on wide screens the footer text stood 24px further out on each side. Pad inside, like .bgt-main.
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.
Tell admins when a new PaGetto release is available
ReleaseCheckServicelooks up the latest release of letreset/PaGetto on the GitHub API at startup and then once a day. While it is newer than the running version, every admin page shows a notice under its tabs with a link to the release notes. Prereleases are not offered.PaGettouser agent GitHub requires. The release notes link is built from the tag, not taken from the answer.Debuglog line) and keeps the release found before.UpdateCheck:Enabled(defaulttrue) turns it off; the test host turns it off so no test contacts GitHub.testenv/UI-TESTS.md..bgt-main.Tests:
ReleaseCheckerTests(version comparison, nothing sent when turned off, network failures and bad answers) andWebUiReleaseNoticeTests(the admin page with a newer release, an older one, the check turned off and no network). The full suite passes locally. Checked in the browser on a 1.3.0 image against the real GitHub API: the notice and link on every admin page in light and dark mode from 320px to 1920px, no notice with the check turned off, and the footer alignment on eight pages.Addresses #109