docs: strengthen skip-if-match guidance for scheduled issue-creating workflows#28545
docs: strengthen skip-if-match guidance for scheduled issue-creating workflows#28545
Conversation
…workflows Agent-Logs-Url: https://github.com/github/gh-aw/sessions/125c4a56-30b2-49be-8ade-e163c076698d Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Strengthens documentation guidance for using skip-if-match to deduplicate scheduled workflows that create issues, preventing repeated duplicate issues across scheduled runs.
Changes:
- Added a “Deduplication for Scheduled Workflows” note to the
safe-outputs.create-issuereference, including a full example pairingskip-if-matchwithexpires. - Added a new Safe Outputs checklist bullet calling out scheduled +
create-issuededuplication, with an inline example and rationale.
Show a summary per file
| File | Description |
|---|---|
| .github/aw/github-agentic-workflows.md | Adds a dedicated deduplication paragraph + example for scheduled workflows that create issues. |
| .github/aw/create-agentic-workflow.md | Updates the Safe Outputs checklist to explicitly require skip-if-match (and expires) for scheduled issue-creating workflows. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
| - **Daily improver workflows** (creates PRs): Add `skip-if-match:` with a filter to avoid opening duplicate PRs (e.g., `'is:pr is:open in:title "[workflow-name]"'`) | ||
| - **Scheduled workflows that create issues**: Add `skip-if-match:` to avoid creating duplicate issues on every run. Pair with `expires:` so resolved issues are cleaned up automatically. Example: | ||
| ```yaml | ||
| on: |
There was a problem hiding this comment.
The example for “Scheduled workflows that create issues” shows on: with only skip-if-match, but no actual trigger (e.g., schedule:). Since skip-if-match is a modifier rather than a trigger, copying this example would produce invalid frontmatter / a compile error. Add a schedule: line (and optionally show it combined with skip-if-match) to make the example runnable.
| on: | |
| on: | |
| schedule: | |
| - cron: '0 9 * * *' |
| skip-if-match: 'is:issue is:open in:title "[workflow-name]"' | ||
| safe-outputs: | ||
| create-issue: | ||
| title-prefix: "[workflow-name] " | ||
| expires: 7 # auto-close after 7 days |
There was a problem hiding this comment.
In the example, title-prefix includes a trailing space ("[workflow-name] ") but the skip-if-match query searches for "[workflow-name]" without the trailing space. This still matches, but it’s less precise and inconsistent with the more exact scheduled-workflow example in github-agentic-workflows.md. Consider aligning the query string with the exact prefix (including the trailing space) to reduce accidental matches.
Agents correctly use
skip-if-matchfor PR deduplication but routinely miss applying it to scheduled workflows that create issues, resulting in duplicate issues on every run.Changes
create-agentic-workflow.md— Added a dedicated bullet under the Safe Outputs design checklist for scheduled +create-issuecombinations, with an inline example pairingskip-if-match:andexpires:.github-agentic-workflows.md— Added a Deduplication for Scheduled Workflows paragraph in thecreate-issuereference section (alongside the existing Auto-Expiration note), with a full frontmatter example: