Skip to content

docs: strengthen skip-if-match guidance for scheduled issue-creating workflows#28545

Merged
pelikhan merged 2 commits intomainfrom
copilot/improve-skip-if-match-guidance
Apr 26, 2026
Merged

docs: strengthen skip-if-match guidance for scheduled issue-creating workflows#28545
pelikhan merged 2 commits intomainfrom
copilot/improve-skip-if-match-guidance

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 26, 2026

Agents correctly use skip-if-match for 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-issue combinations, with an inline example pairing skip-if-match: and expires:.

  • github-agentic-workflows.md — Added a Deduplication for Scheduled Workflows paragraph in the create-issue reference section (alongside the existing Auto-Expiration note), with a full frontmatter example:

on:
  schedule: daily on weekdays
  skip-if-match: 'is:issue is:open in:title "[my-workflow] "'
safe-outputs:
  create-issue:
    title-prefix: "[my-workflow] "
    expires: 7

Copilot AI changed the title [WIP] Improve skip-if-match guidance for scheduled workflows docs: strengthen skip-if-match guidance for scheduled issue-creating workflows Apr 26, 2026
Copilot AI requested a review from pelikhan April 26, 2026 04:48
@pelikhan pelikhan marked this pull request as ready for review April 26, 2026 04:51
Copilot AI review requested due to automatic review settings April 26, 2026 04:51
@pelikhan pelikhan merged commit 9da169c into main Apr 26, 2026
3 checks passed
@pelikhan pelikhan deleted the copilot/improve-skip-if-match-guidance branch April 26, 2026 04:51
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

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-issue reference, including a full example pairing skip-if-match with expires.
  • Added a new Safe Outputs checklist bullet calling out scheduled + create-issue deduplication, 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:
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
on:
on:
schedule:
- cron: '0 9 * * *'

Copilot uses AI. Check for mistakes.
Comment on lines +834 to +838
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
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Strengthen skip-if-match guidance for scheduled workflows in create-agentic-workflow.md

3 participants