ci: scope doc-sync to existing docs only, record no-op decisions - #1315
Merged
Conversation
The previous real doc-sync run failed with "401 API key is invalid" - adds a step that prints ANTHROPIC_API_KEY's length (never its value) right before the real Claude step, to confirm the freshly-replaced secret is actually reaching the runner. Also adds a separate smoke-test job on push to abueide/** so this can be checked by just pushing a commit, rather than needing to merge a real, approved PR each time - push events have no PR to gate on or diff against, so it's a distinct job with its own minimal prompt rather than reusing doc-sync's PR-dependent steps. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Removes the temporary ANTHROPIC_API_KEY length check from the real doc-sync job now that the push-triggered smoke test has confirmed the replaced secret authenticates correctly. - Prompt now explicitly instructs Claude to only update EXISTING documentation and never create new docs/README sections that didn't already exist before the merged PR. - When no existing docs are relevant, Claude records that decision to doc-sync-decision.md instead of silently doing nothing - a new step uploads it as a job artifact (if-no-files-found: ignore covers the normal case where a PR was opened instead and no file was written). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Removes the smoke-test job and its push-to-abueide/** trigger now that it's served its purpose (confirmed the API key works) - doc-sync is back to its original single-job, pull_request_target-only shape. Adds CLAUDE.md instructing in-code comments stay to 1 line, so Claude follows it both for interactive use and for the doc-sync automation. Not AGENTS.md: this repo's .gitignore deliberately keeps AGENTS.md local-only (grouped with other "not for commit" entries), which would mean it never reaches doc-sync's CI checkout at all. CLAUDE.md isn't gitignored and Claude Code reads it the same way. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Follows the CLAUDE.md rule added in the previous commit - collapses the four multi-paragraph header comments and the artifact-upload comment down to a single line each, moving the dropped detail to PR descriptions instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Four single-line comments in a row at the file header read as one 4-line comment in practice. Distributes each to sit directly next to the line it explains (trigger choice, approval gate, CLI install) instead, and drops the purely-descriptive one that just restated what the workflow/job/step names already say. Also tightens CLAUDE.md's wording so this doesn't happen again: a comment must be a single line AND not stacked with others as a paragraph substitute. Co-Authored-By: Claude Sonnet 5 <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.
Follow-up to #1313 now that the API key secret has been replaced and verified working.
Changes:
doc-syncjob — its replacement was confirmed working via a push-triggered smoke test, which has now also been removed (served its purpose; doc-sync is back to its original single-job,pull_request_target-only shape).doc-sync-decision.md, which a new step uploads as a job artifact (if-no-files-found: ignorecovers the normal case where a PR was opened instead and the file was never written) — so a "nothing to do" outcome is visible in the run's artifacts rather than just silently vanishing.CLAUDE.mdinstructing that in-code comments stay to 1 line, so this applies both to interactive Claude Code use and to the doc-sync automation. NotAGENTS.md: this repo's.gitignoredeliberately keepsAGENTS.mdlocal-only (grouped with other "not for commit" entries), which would mean it never reaches doc-sync's CI checkout at all —CLAUDE.mdisn't gitignored and Claude Code reads it the same way.🤖 Generated with Claude Code