Repository navigation
Conversation
Add scripts/release-sync.mjs, which lists each source's tags with git ls-remote and adds the stable releases newer than the newest listed version to sources.yml, editing the text so comments and layout survive. The daily Release sync workflow runs it and keeps one pull request open from the release-sync branch, using a GitHub App token so the Site workflow runs on it. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
✅ Deploy Preview for ai-openshell-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been deployed
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
New source releases no longer need a hand-edited
sources.yml(as in #11 for Go SDK v0.1.9). The docs repo polls for them, the same pull model the SDK repos use to follow core. Source repos don't dispatch anything.scripts/release-sync.mjslists each source's tags withgit ls-remote --tags(newlistTagsinassembler/fetch.mjs). It adds the stable releases (vX.Y.ZorX.Y.Z;-pre.N,-rc.Nand other suffixes are skipped) that are newer than the newest listed version. They go at the top ofversions, newest first, as{ name: "X.Y.Z", ref: vX.Y.Z }. The file is edited as text, so comments and layout are kept. A second run changes nothing. Older tags are never added, so a release removed by hand stays removed. Options:--dry-runand--json(title and body for the PR). It also runs asmise run release-sync..github/workflows/release-sync.ymlruns daily and onworkflow_dispatch. It keeps one PR open from the fixedrelease-syncbranch, titled for examplechore(sources): publish sdk-go 0.1.9:main. It is force-pushed only when the proposedsources.ymlchanges; then the open PR's title and body are updated.mainalready lists every release, an open proposal is closed.test/release-sync.test.mjs: unit tests, plus end-to-end runs against local git repos with release, pre-release, annotated and lightweight tags.sources.ymlis the list.Run against the real
sources.yml(2026-11-19,mainwithout #11)versions: + - { name: "0.1.9", ref: v0.1.9 } - { name: "0.1.8", ref: v0.1.8 }That is the same entry #11 adds by hand. A second run prints
No new releases.Once #11 merges, the first scheduled run finds nothing.Maintainer setup
The workflow fails at the token step until this is done:
ai-openshell/docswith Contents: read and write and Pull requests: read and write. The sdk-gosdk-botApp can be reused if it is installed here; otherwise create a docs bot.GITHUB_TOKENdon't trigger other workflows, soSite(lint, tests, build) would not run on the proposal.docs-botwith deployment branches limited tomain, so a pushed branch can't mint a bot token. It holds two secrets:DOCS_BOT_CLIENT_ID: the App's client ID.DOCS_BOT_PRIVATE_KEY: a private key of the App.After merging, run Release sync once from the Actions tab to check the setup.
Follow-up (not in this PR): dev pages on Netlify go stale
Siterebuilds hourly to pick up each source'smain, but it publishes to GitHub Pages, which isn't set up. Netlify, the live host, rebuilds only on pushes to this repo, so thedevversions there fall behind their source branches. The pull-based fix:mainand store its URL as a repo secret, such asNETLIFY_BUILD_HOOK.Site) that POSTs to it.repository_dispatchtrigger fromSite.Testing
npm test: 38 pass.npm run lint: clean.actionlint(with shellcheck) on the new workflow: clean.