Skip to content

chore: Configure editorial workflow to run once on PR creation#1099

Merged
justinegeffen merged 4 commits intomasterfrom
editorial-v3
Feb 5, 2026
Merged

chore: Configure editorial workflow to run once on PR creation#1099
justinegeffen merged 4 commits intomasterfrom
editorial-v3

Conversation

@justinegeffen
Copy link
Contributor

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)

  • ✅ Runs automatically on PR creation (opened)
  • ✅ Runs automatically on PR reopen (reopened)
  • ❌ Does NOT run on subsequent commits (removed synchronize trigger)
  • ✅ Manual re-runs available via workflow dispatch

Documentation updates

  • .claude/README.md: Added manual re-run instructions with 5-step process
  • CLAUDE.md: Updated all sections to clarify one-time automatic behavior

Rationale

Before:

  • Workflow ran on every commit (synchronize event)
  • High token consumption from repeated runs
  • Re-ran automatically when applying inline suggestions
  • No control over when reviews happened

After:

  • Initial automated review on PR creation (feedback when needed most)
  • Reviewers control subsequent re-runs (token efficiency)
  • Clear documentation for manual re-run process
  • Better cost management for large PRs with many fixes

Manual re-run process

After the initial automatic review, reviewers can re-run the workflow:

  1. Go to ActionsDocumentation Review
  2. Click Run workflow
  3. Select the PR branch
  4. Choose review type (all, voice-tone, terminology, clarity)
  5. Click Run workflow

Impact

  • Token usage: Significantly reduced (1 automatic run vs N runs per PR)
  • User experience: Still get immediate feedback on PR creation
  • Control: Teams decide when to re-check after applying fixes
  • Flexibility: Manual dispatch available anytime

🤖 Generated with Claude Code

## 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>
@netlify
Copy link

netlify bot commented Feb 3, 2026

Deploy Preview for seqera-docs ready!

Name Link
🔨 Latest commit bf46557
🔍 Latest deploy log https://app.netlify.com/projects/seqera-docs/deploys/6984aa65b57e2700087e0dd4
😎 Deploy Preview https://deploy-preview-1099--seqera-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@justinegeffen justinegeffen added 1. Editor review Needs a language review automation-fix Automation bug fix. automation-improvement Automation enhancement for existing automation that's working but could be better. labels Feb 3, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.yml to remove the synchronize pull_request trigger (run only on opened/reopened).
  • Updated CLAUDE.md to clarify the workflow runs once automatically and to document the manual re-run steps.
  • Updated .claude/README.md to 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.

justinegeffen and others added 2 commits February 3, 2026 22:40
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>
@justinegeffen
Copy link
Contributor Author

Fixed workflow_dispatch issues

Thanks for the detailed feedback! I've addressed all three issues:

1. ✅ PR number now available for manual runs

Added new setup job that determines the PR number:

  • For pull_request events: Extracts from github.event.pull_request.number
  • For workflow_dispatch: Uses new required pr_number input
  • All jobs now reference needs.setup.outputs.pr_number consistently

2. ✅ Manual dispatch can now post results

Removed event gating:

  • Deleted if: github.event_name == 'pull_request' from comment posting
  • Both consolidated review and summary jobs now work for manual runs
  • Results post back to the PR specified in the input

3. ✅ review_type input now functional

Wired 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 instructions

Documentation now includes the PR number requirement:

  1. Go to ActionsDocumentation Review
  2. Click Run workflow
  3. Select your PR branch
  4. Enter the PR number (new requirement)
  5. Choose review type
  6. Click Run workflow

The workflow will now correctly post inline suggestions and comments back to the specified PR! 🎉

@justinegeffen justinegeffen merged commit f8034ea into master Feb 5, 2026
8 checks passed
@justinegeffen justinegeffen deleted the editorial-v3 branch February 5, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. Editor review Needs a language review automation-fix Automation bug fix. automation-improvement Automation enhancement for existing automation that's working but could be better.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants