Skip to content

ci: allow docs-sync to be triggered manually - #17

Merged
evanorti merged 1 commit into
mainfrom
ci/docs-sync-dispatch
Aug 25, 2026
Merged

ci: allow docs-sync to be triggered manually#17
evanorti merged 1 commit into
mainfrom
ci/docs-sync-dispatch

Conversation

@evanorti

Copy link
Copy Markdown
Collaborator

Adds workflow_dispatch to 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. main has the correct content, but nothing will push it to the docs site until a docs/** change lands.

Loop guard

Unaffected. On workflow_dispatch there is no head_commit, so contains(github.event.head_commit.message, '[docs-sync]') is false and the job runs normally.

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-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown

Greptile Summary

Adds a manual dispatch trigger to the documentation synchronization workflow so failed or stale synchronization can be retried without another docs commit.

  • Preserves the existing push trigger for docs changes on main.
  • Adds an input-free workflow_dispatch trigger and explanatory comments.

Confidence Score: 4/5

The 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

Filename Overview
.github/workflows/docs-sync.yml Adds manual execution, but the source checkout follows the selected dispatch branch rather than reliably syncing main and the required changelog entry is absent.

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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Comment on lines +14 to +17
# 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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

@evanorti
evanorti merged commit f7eee05 into main Aug 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant