Skip to content

[docs] docs: unbloat triggers.md (1040 → 810 lines, 22% reduction)#35015

Merged
pelikhan merged 2 commits into
mainfrom
docs/unbloat-triggers-a23cee33c0eebc0c
May 26, 2026
Merged

[docs] docs: unbloat triggers.md (1040 → 810 lines, 22% reduction)#35015
pelikhan merged 2 commits into
mainfrom
docs/unbloat-triggers-a23cee33c0eebc0c

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 26, 2026

Summary

Editorial pass on docs/src/content/docs/reference/triggers.md reducing file length from ~1040 to ~810 lines (22% reduction) without removing documented functionality.

Changes

File modified

docs/src/content/docs/reference/triggers.md

Content removed

  • Full workflow aw wrap examples that duplicated configuration already shown elsewhere (e.g., the locked-issue-processor.md workflow under lock-for-agent:, the smart-responder.md and multi-step label-check workflows under on.steps:)
  • Redundant YAML code blocks split across multiple fences, merged into single annotated blocks with inline comments
  • Bullet-list expansions of short enumerations (fork spec options, supported input types, common bot names, valid state values callout) condensed to inline prose
  • Explicit NOTE callout explaining state: compilation to a GitHub Actions if: expression
  • Duplicate skip-if-no-match example that mirrored skip-if-match usage with github-app

Content revised

  • workflow_dispatch inputs section: removed full workflow wrapper, kept only the markdown snippet showing ${{ github.event.inputs.topic }} expression
  • Fuzzy scheduling: merged three separate schedule: code blocks into one block with commented variants
  • deployment_status state: section: merged two single-state / multi-state examples into one
  • on.steps: section: collapsed to a single forward reference to the Pre-Activation Steps anchor; full examples retained in that dedicated sub-section
  • skip-if-no-match section: removed embedded github-app example, now cross-references skip-if-match behaviour
  • on.roles:/on.skip-roles: section: heading corrected from on.skip-roleson.skip-roles: (trailing colon added for consistency)
  • github-app object documentation: clarified that client-id is the canonical field and app-id is a deprecated alias
  • CentralRepoOps shared workflow example: tightened prose, removed duplication between body text and code comment

No functional changes

No configuration keys, default values, compiler behaviour, or cross-links were altered. All documented features remain described.

Commits

  • ac923c153 docs: unbloat triggers.md (1040 → 810 lines, 22% reduction)
  • ab7dd8778 docs: fix review feedback in triggers.md

Generated by PR Description Updater for issue #35015 · sonnet46 745.4K ·

Remove duplicate documentation of `on.steps:` (was covered in both "Filtering by Custom Steps" and "Pre-Activation Steps"). Consolidate skip-if-match / skip-if-no-match auth/scope notes by cross-referencing instead of restating. Condense bullet lists (fork specifications, supported input types, common bot names, workflow_run protections) into prose. Merge near-duplicate roles/bots example blocks. Remove redundant code samples where the configuration is already shown in a prior block.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added automation doc-unbloat documentation Improvements or additions to documentation labels May 26, 2026
@pelikhan pelikhan marked this pull request as ready for review May 26, 2026 18:24
Copilot AI review requested due to automatic review settings May 26, 2026 18:24
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 26, 2026

PR Code Quality Reviewer completed the code quality review.

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 26, 2026

🧪 Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. The PR '[docs] docs: unbloat triggers.md (1040 → 810 lines, 22% reduction)' (#35015) only modifies docs/src/content/docs/reference/triggers.md (documentation). Test Quality Sentinel skipped.

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 26, 2026

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 26, 2026

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #35015 does not have the 'implementation' label and has 0 new lines of code in default business logic directories (≤100 threshold).

Copy link
Copy Markdown
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

This PR streamlines the Triggers reference documentation by removing duplicated explanations and consolidating repetitive examples/prose while aiming to preserve all technical semantics and links.

Changes:

  • Condensed repeated sections (e.g., fuzzy scheduling, skip-if behavior notes, workflow_run protections) into shorter prose and merged example blocks.
  • Replaced several full-workflow examples with focused snippets or cross-references to authoritative sections.
  • Simplified/merged YAML examples for roles/bots filtering and removed redundant scaffolding in markdown examples.
Show a summary per file
File Description
docs/src/content/docs/reference/triggers.md Removes duplicated trigger/filtering documentation and consolidates examples to reduce length while keeping the same documented behavior.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (2)

docs/src/content/docs/reference/triggers.md:623

  • This section’s github-app example uses client-id, but a few lines below the table still says github-app requires app-id. Please align the wording here (and the table) to document client-id as the preferred key, with app-id only as a deprecated alias if applicable.
A pre-activation check runs the query against the current repository. If matches reach or exceed the threshold (default `max: 1`), the workflow is skipped. All standard GitHub search qualifiers are supported (`is:`, `label:`, `in:title`, `author:`, etc.).

Use `scope: none` to remove the automatic repo qualifier and search org-wide. For cross-repo or org-wide searches that need elevated permissions, configure `github-token` or `github-app` at the top-level `on:` section — the same token is shared across all skip-if checks and the activation job:

docs/src/content/docs/reference/triggers.md:690

  • The explicit-output example references steps.label_check.outputs.has_bug_label, but the preceding step example (above) doesn’t show setting that output (it only relies on exit codes). Consider adding a minimal step snippet that writes has_bug_label to $GITHUB_OUTPUT, or explicitly state where that output is defined, so copy/paste readers don’t end up with a non-working example.
To pass an explicit value rather than relying on exit codes, set a step output (e.g., `echo "has_bug_label=true" >> "$GITHUB_OUTPUT"`) and re-expose it via `jobs.pre-activation.outputs`:

```yaml wrap
jobs:
  pre-activation:
    outputs:
      has_bug_label: ${{ steps.label_check.outputs.has_bug_label }}
  • Files reviewed: 1/1 changed files
  • Comments generated: 3

```

The `github-app` object accepts the same fields as the GitHub App configuration used elsewhere in the framework (`app-id`, `private-key`, and optionally `owner` and `repositories`). The token is minted once in the pre-activation job and is shared across the reaction step, the status comment step (if `status-comment: true`), and any skip-if search steps.
The `github-app` object accepts `app-id`, `private-key`, and optionally `owner` and `repositories` — the same fields used elsewhere in the framework. The token is minted once in the pre-activation job.
The `github-app` object accepts `app-id`, `private-key`, and optionally `owner` and `repositories` — the same fields used elsewhere in the framework. The token is minted once in the pre-activation job.

Both `github-token` and `github-app` can be defined in a **shared agentic workflow** and will be automatically inherited by any workflow that imports it (first-wins strategy). This means a central CentralRepoOps shared workflow can define the app config once and all importing workflows benefit automatically:
Both fields can be defined in a **shared agentic workflow** and are inherited by importers (first-wins). A central CentralRepoOps shared workflow can define the app config once and all importers benefit:
```
For conditions based on GitHub search results, use [`skip-if-match:`](#skip-if-match-condition-skip-if-match) or [`skip-if-no-match:`](#skip-if-no-match-condition-skip-if-no-match) in the `on:` section. These accept standard [GitHub search query syntax](https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests) and produce the same skipped-not-failed behavior.

### Filtering by Repository Access Roles (`on.roles:`, `on.skip-roles`)
@github-actions github-actions Bot mentioned this pull request May 26, 2026
Copy link
Copy Markdown
Contributor Author

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Documentation cleanup — technically accurate, well-structured reduction. One non-blocking observation.

### Review summary

What's good: All condensations are technically accurate. Cross-references resolve. No YAML field names, valid values, or behavioral semantics were altered. The fuzzy scheduling, roles/bots/author-association, and lock-for-agent sections are all cleaner without losing correctness.

One observation: The state: filtering section previously had a NOTE block showing the exact generated if: expression (github.event_name != 'deployment_status' || ...). This was the most concrete diagnostic aid in that section — users who hit unexpected skip behavior and inspect compiled YAML would know exactly what to look for. The replacement prose ("guard ensures dispatch passes through") is accurate but opaque. Restoring just the expression as a compact blockquote would recapture the debugging value at minimal line cost.

All other removals are unambiguous improvements.

🔎 Code quality review by PR Code Quality Reviewer · sonnet46 1.1M

workflow_dispatch: # Safely combined — guard ensures dispatch passes through
```

Valid `state` values: `error`, `failure`, `pending`, `success`, `inactive`, `in_progress`, `queued`, `waiting`.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The removed NOTE contained the exact generated if: expression, which is the most practical debugging aid for users who want to understand why a combined trigger behaves differently than expected.

💡 Suggestion

Consider keeping a compact inline reference to the generated condition:

> The compiler emits: `github.event_name != 'deployment_status' || (github.event.deployment_status.state == 'failure')`

Without it, "guard ensures dispatch passes through" is opaque to users who hit unexpected skips and inspect the compiled YAML trying to understand the behavior.

Copy link
Copy Markdown
Contributor Author

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /grill-with-docs — no blocking issues; 3 minor observations on condensation nuance.

📋 Key Themes & Highlights

Positive Highlights

  • ✅ 22% line reduction is well-motivated — the removed content was genuinely duplicated or redundant
  • ✅ All YAML field names, valid values, and configuration semantics preserved
  • ✅ Cross-references (anchors) correctly point to authoritative sections rather than repeating content
  • ✅ PR description is thorough and explains every removal category — easy to audit
  • ✅ The inline code example for echo "has_bug_label=true" >> "$GITHUB_OUTPUT" added in the Pre-Activation Steps section is a net improvement

Minor Observations (inline)

  1. Fuzzy scheduling block — commented-out alternatives could be misread as multi-value config
  2. status-comment suppression — "omit or set to false" guidance was dropped
  3. github-app token scope — detail about what steps share the minted token was removed; helpful for permission debugging

All three are suggestions only — none block merging.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 1.5M

```yaml wrap
on:
schedule: daily between 9:00 and 17:00 # Scatters within 9am-5pm range
schedule: daily # Compiler picks a scattered time
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[/grill-with-docs] The merged fuzzy-scheduling block uses commented-out alternatives inside a single YAML example, which could be misread as a multi-value on: config rather than three mutually-exclusive forms.

💡 Suggestion

A small clarifying label (e.g. # OR: prefix or a trailing note "choose one") would prevent copy-paste errors:

on:
  schedule: daily                               # Compiler picks a scattered time
  # OR: schedule: daily around 14:00           # ±1 hour around 2pm
  # OR: schedule: daily between 9:00 and 17:00 # Scatters within 9am-5pm

Minor nit — the current form is still readable given the prose above it.

For all other trigger types, `status-comment` must be explicitly set to `true` to enable it. To suppress status comments, omit `status-comment:` or set it to `false`.

Use an object to enable status comments while selectively disabling specific targets. The object form implies status comments are enabled; each field defaults to `true`:
For all other triggers, `status-comment` must be explicitly set to `true`. Use an object to selectively disable specific targets (each field defaults to `true`):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[/grill-with-docs] The condensed paragraph omits the original guidance that status-comment can also be suppressed by omitting the field (not only by setting it to false). This is a minor but useful clarification for users who want to be explicit.

💡 Optional addition

Consider appending: "To suppress it, omit status-comment: or set it to false."

This was present in the pre-refactor text and is a common question when users see status-comment for the first time.

```

The `github-app` object accepts the same fields as the GitHub App configuration used elsewhere in the framework (`app-id`, `private-key`, and optionally `owner` and `repositories`). The token is minted once in the pre-activation job and is shared across the reaction step, the status comment step (if `status-comment: true`), and any skip-if search steps.
The `github-app` object accepts `app-id`, `private-key`, and optionally `owner` and `repositories` — the same fields used elsewhere in the framework. The token is minted once in the pre-activation job.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[/grill-with-docs] The condensation drops the detail about what the minted token is shared across (reaction step, status-comment step, skip-if search steps). This is useful context for users troubleshooting permission errors on those sub-steps.

💡 Consider restoring the scope detail

The previous text was:

The token is minted once in the pre-activation job and is shared across the reaction step, the status comment step (if status-comment: true), and any skip-if search steps.

This is the key "why should I care" for users who set github-app: specifically to get elevated skip-if search permissions.

@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot review all comments and review comments

@github-actions
Copy link
Copy Markdown
Contributor Author

\n\n@copilot review all comments and address the 7 open review threads, then re-request review once they are resolved.

Generated by 👨‍🍳 PR Sous Chef · gpt54 26.4M ·

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

@copilot review all comments and review comments

Addressed all three review comments in commit docs: fix review feedback in triggers.md:

  • Line 383: Added the missing trailing : → heading now reads on.skip-roles:.
  • Lines 553 / 640: Updated both occurrences of app-id to client-id (the preferred field); added a parenthetical noting app-id as a deprecated alias.
  • Line 555: Removed the redundant "central" prefix — now reads "A CentralRepoOps shared workflow...".

Copilot AI requested a review from pelikhan May 26, 2026 18:47
@pelikhan pelikhan merged commit 322af57 into main May 26, 2026
@pelikhan pelikhan deleted the docs/unbloat-triggers-a23cee33c0eebc0c branch May 26, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation doc-unbloat documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants