chore: Configure editorial workflow to run once on PR creation#1099
chore: Configure editorial workflow to run once on PR creation#1099justinegeffen merged 4 commits intomasterfrom
Conversation
## Changes ### Workflow behavior - Removed `synchronize` trigger from docs-review.yml - Workflow now runs automatically only on PR creation/reopen - Subsequent commits do NOT trigger automatic re-runs (conserves tokens) - Manual re-runs remain available via workflow_dispatch ### Documentation updates - Updated `.claude/README.md` with manual re-run instructions - Updated `CLAUDE.md` to clarify one-time automatic run behavior - Added 5-step manual re-run process to both docs - Clarified that workflow doesn't auto-run on subsequent commits ## Rationale Previously, the workflow ran on every commit (`synchronize` event), which: - Consumed tokens on every push - Re-ran even for trivial fixes - Could trigger repeatedly when applying inline suggestions New behavior: - ✅ Automatic review on PR creation (initial feedback) - ❌ No automatic re-runs on commits (token efficiency) - ✅ Reviewers choose when to re-check (manual control) This provides initial automated feedback while giving teams control over subsequent reviews, preventing unnecessary token consumption. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
✅ Deploy Preview for seqera-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adjusts the Claude-powered documentation editorial workflow to run automatically only on PR open/reopen (instead of on every commit) and updates contributor docs to explain the new one-time automatic behavior and manual re-run process.
Changes:
- Updated
docs-review.ymlto remove thesynchronizepull_request trigger (run only onopened/reopened). - Updated
CLAUDE.mdto clarify the workflow runs once automatically and to document the manual re-run steps. - Updated
.claude/README.mdto document manual re-runs and the new trigger behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/docs-review.yml |
Removes per-commit (synchronize) auto-runs; positions workflow_dispatch as the re-run mechanism. |
CLAUDE.md |
Updates workflow trigger/behavior documentation and adds a clearer manual re-run procedure. |
.claude/README.md |
Documents updated trigger behavior and adds manual re-run instructions for reviewers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Justine Geffen <justinegeffen@users.noreply.github.com>
## Changes ### Workflow improvements - Added `pr_number` input to workflow_dispatch (required) - Created `setup` job to determine PR number for both automatic and manual runs - Wired `review_type` input to agent job conditions - Removed `github.event_name == 'pull_request'` gate from comment posting - All PR number references now use `needs.setup.outputs.pr_number` ### Agent job conditions - voice-tone: Runs if review_type is 'all' or 'voice-tone' - terminology: Runs if review_type is 'all' or 'terminology' - clarity: Updated condition (currently disabled) ### Documentation updates - Updated manual re-run instructions to include PR number input - Now 6-step process (added PR number as step 4) - Updated both .claude/README.md and CLAUDE.md ## What this fixes **Before:** - Manual dispatch couldn't post results (no PR context) - review_type input was defined but unused - Comments gated behind pull_request event only **After:** - Manual dispatch posts results to specified PR - review_type controls which agents run - Works for both automatic (PR events) and manual (workflow_dispatch) runs Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed workflow_dispatch issuesThanks for the detailed feedback! I've addressed all three issues: 1. ✅ PR number now available for manual runsAdded new
2. ✅ Manual dispatch can now post resultsRemoved event gating:
3. ✅ review_type input now functionalWired to job conditions: # voice-tone job runs if:
if: ... && (needs.setup.outputs.review_type == 'all' || needs.setup.outputs.review_type == 'voice-tone')
# terminology job runs if:
if: ... && (needs.setup.outputs.review_type == 'all' || needs.setup.outputs.review_type == 'terminology')Manual dispatch now respects the selected review type and only runs those agents. Updated manual re-run instructionsDocumentation now includes the PR number requirement:
The workflow will now correctly post inline suggestions and comments back to the specified PR! 🎉 |
Summary
Configures the editorial workflow to run automatically only once (on PR creation/reopen) instead of on every commit. This prevents excessive token consumption while still providing initial automated feedback.
Changes
Workflow behavior (
.github/workflows/docs-review.yml)opened)reopened)synchronizetrigger)Documentation updates
.claude/README.md: Added manual re-run instructions with 5-step processCLAUDE.md: Updated all sections to clarify one-time automatic behaviorRationale
Before:
synchronizeevent)After:
Manual re-run process
After the initial automatic review, reviewers can re-run the workflow:
all,voice-tone,terminology,clarity)Impact
🤖 Generated with Claude Code