Auto-detect target Materialize version for docs skill bump#7
Draft
bosconi wants to merge 2 commits into
Draft
Conversation
When `mz_version` input is empty, the workflow now reads level-2 version headings from doc/user/content/releases/_index.md on materialize@main, takes the highest, and compares against the version recorded in the heading of skills/materialize-docs/README.md. It only regenerates when the upstream release is strictly newer, and updates the README heading to the new version after a successful auto-bump. The PR is created non-draft, and explicit `mz_version` invocations still bypass version-checking and leave the README heading alone. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When the workflow is dispatched on a feature branch via `gh workflow run --ref <branch>`, actions/checkout would otherwise default to that branch's tree. The auto-bump PR then inherits the feature-branch changes (e.g. the workflow file itself). Pin the checkout to the default branch so test runs and production runs both produce auto-bump PRs that contain only generated content. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
def-
reviewed
Apr 29, 2026
def-
left a comment
There was a problem hiding this comment.
What kind of tokens does the LLM have access to by the way? Could it do something else than just open a PR?
| working-directory: agent-skills | ||
| env: | ||
| INPUT_MZ_VERSION: ${{ inputs.mz_version }} | ||
| run: | |
There was a problem hiding this comment.
This is so complex it should really be a Python script using the semver library I guess. We have code for some of that in the Materialize repo already.
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
Adds version-aware auto-bump behavior to the
update-materialize-docs-skillworkflow.mz_versionis empty, the workflow reads level-2 version headings (## vX.Y.Z) fromdoc/user/content/releases/_index.mdonmaterialize@main, takes the highest, and compares against the version recorded in the heading ofskills/materialize-docs/README.md(# materialize-docs vX.Y.Z).mz_versionis explicitly provided, the workflow always regenerates at that ref and leaves the README heading alone.Testing without merging
Once this branch is pushed, the workflow file on
mainis still the previous version. To run this branch's version of the workflow without merging:GitHub Actions will execute the workflow file from
jc/auto-detect-mz-version(rather thanmain). The workflow itself still operates against the agent-skills repo — itsSet up branchstep targets the standardautomated/update-materialize-docs-skillbranch, so it will (if there are content changes) open a PR that is reviewable and merge-targeted atmain.Test plan
gh workflow run update-materialize-docs-skill.yml --ref jc/auto-detect-mz-versionwith no inputs — confirm it detectsv26.20.2, regenerates, updates the README heading, opens a non-draft PR.mainafter the auto-bump PR merges — confirm the second run is a no-op (already up to date).gh workflow run update-materialize-docs-skill.yml --ref jc/auto-detect-mz-version -f mz_version=v26.19.0— confirm it regenerates at the explicit ref without touching the README heading.Generated with Claude Code