Auto-refresh: fetch dispatched docs ref and bump the pin - #8
Open
franco-zalamena-iterable wants to merge 1 commit into
Open
Auto-refresh: fetch dispatched docs ref and bump the pin#8franco-zalamena-iterable wants to merge 1 commit into
franco-zalamena-iterable wants to merge 1 commit into
Conversation
The refresh workflow could be triggered by an iterable-docs dispatch, but fetch:sources always read the frozen `source.ref` in pipeline/config — so a dispatch pulled the same pinned commit, the diff was empty, and no PR opened. This closes that gap (Gap 2 of the auto-refresh plan; the sender workflow in iterable-docs is the other half, modeled on iterable-docs#1489). - fetch.ts: honor a SOURCE_REF env override; unset → the config pin is used, so local/manual runs are unchanged. - set-source-ref.ts (new) + set:source-ref script: comment-preserving write-back of source.ref/ref_label into pipeline/config, guarded to a 40-hex sha, no-op when already pinned there. - refresh-docs.yml: resolve client_payload.ref (or the docs default-branch head on a manual run) to a full commit sha, fetch at that sha, and bump the pin in the same PR so provenance stays honest. Reviewer steps updated. The PR is still opened, not merged — refreshes stay human-gated (REVIEW.md). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Make the docs auto-refresh actually produce a PR when Iterable's docs change. This is the skill-repo half of the auto-update the docs team asked for — the counterpart to the sender workflow that belongs in
iterable-docs(modeled on iterable-docs#1489).Why
refresh-docs.ymlalready listens for aniterable-docs-changedrepository_dispatch. Butfetch:sourcesalways read the frozensource.refpinned inpipeline/config/android.yml, so even when a dispatch fired, the fetch pulled the same commit, thegit diffwas empty, and no PR ever opened. The receiver was wired but inert.Changes
fetch.ts— honor aSOURCE_REFenv override to fetch from a specific commit instead of the config pin. Unset (local/manual runs) → the pin is used, behavior unchanged.set-source-ref.ts(new) +set:source-refscript — comment-preserving write-back ofsource.ref/ref_labelintopipeline/config. Guarded to a 40-hex sha (won't pin a mutable branch), and a no-op when already pinned there (safe to call unconditionally).refresh-docs.yml— new "Resolve source ref" step turnsclient_payload.ref(or the docs default-branch head on a manual run) into a full commit sha, passes it to the fetch, and bumps the config pin in the same PR so provenance stays honest. Reviewer steps + PR body updated to mention the bump.Design notes
REVIEW.md. "Auto-update" = PR opened automatically.Validation
pnpm check:allgreen (typecheck, polished schema, validate-plugins, snapshot verify).set:source-reftested locally: bumps ref + label, preserves all config comments, no-ops on an already-pinned sha, and rejects a non-sha ref.refresh-docs.ymlparses; step order is Resolve → Fetch → Polish → Detect → Bump → Open PR.Still needed for end-to-end auto-update (in
iterable-docs, not this PR)The sender workflow + a cross-repo dispatch token. See
docs/AUTO_REFRESH_PLAN.mdfor the full two-repo plan and the open questions for the docs team.🤖 Generated with Claude Code