ci: allow docs-sync to be triggered manually - #17
Conversation
The push trigger only fires on docs/** changes, so a workflow-only fix cannot re-run the sync, and a sync PR left stale by a failed run cannot catch up until someone happens to edit a doc. cosmos/docs#342 is in exactly that state. The loop guard is unaffected: on workflow_dispatch there is no head_commit, so contains() is false and the job runs.
Greptile SummaryAdds a manual dispatch trigger to the documentation synchronization workflow so failed or stale synchronization can be retried without another docs commit.
Confidence Score: 4/5The PR should not merge until manual runs are pinned to main so operators cannot sync documentation from an unintended branch. The new trigger makes non-main refs reachable while the unpinned checkout feeds that selected branch into a workflow that updates or creates a docs-site PR targeting main; the changelog omission is additional non-blocking repository-maintenance feedback. Files Needing Attention: .github/workflows/docs-sync.yml Important Files Changed
Reviews (1): Last reviewed commit: "ci: allow docs-sync to be triggered manu..." | Re-trigger Greptile |
| # Manual trigger. Needed because the push trigger only fires on docs/** changes, | ||
| # so a workflow-only fix cannot re-run the sync, and a sync PR left stale by a | ||
| # failed run has no way to catch up until the next docs edit. | ||
| workflow_dispatch: |
There was a problem hiding this comment.
Manual dispatch uses selected branch
When an operator dispatches this workflow from a non-main branch, the unpinned source checkout transforms that branch's documentation and commits it to a docs-site PR targeting main, causing stale or feature-branch content to enter the sync PR; an older branch without the transform script instead makes the run fail.
| # Manual trigger. Needed because the push trigger only fires on docs/** changes, | ||
| # so a workflow-only fix cannot re-run the sync, and a sync PR left stale by a | ||
| # failed run has no way to catch up until the next docs edit. | ||
| workflow_dispatch: |
There was a problem hiding this comment.
Manual trigger lacks changelog entry
This workflow change has no corresponding entry in the Unreleased changelog, despite the repository requirement to document every change, so the release history omits the newly supported manual docs-sync operation.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Adds
workflow_dispatchto the docs-sync workflow.Why
The push trigger is scoped to
paths: docs/**. That means:cosmos/docs#342 is in that state right now: it carries only the first of two batches of doc fixes, because the run for the second batch hit the bug fixed in #16.
mainhas the correct content, but nothing will push it to the docs site until adocs/**change lands.Loop guard
Unaffected. On
workflow_dispatchthere is nohead_commit, socontains(github.event.head_commit.message, '[docs-sync]')is false and the job runs normally.