Skip to content

Commit 9da169c

Browse files
authored
docs: strengthen skip-if-match guidance for scheduled issue-creating workflows (#28545)
1 parent e5e31c9 commit 9da169c

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

.github/aw/create-agentic-workflow.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,16 @@ Based on the parsed requirements, determine:
828828
- **No action needed**`safe-outputs: noop:` - **IMPORTANT**: When the agent successfully completes but determines nothing needs to be done, use `noop` to signal completion. This is critical for transparency—it shows the agent worked AND that no output was necessary.
829829
- **Daily reporting workflows** (creates issues/discussions): Add `close-older-issues: true` or `close-older-discussions: true` to prevent clutter
830830
- **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]"'`)
831+
- **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:
832+
```yaml
833+
on:
834+
skip-if-match: 'is:issue is:open in:title "[workflow-name]"'
835+
safe-outputs:
836+
create-issue:
837+
title-prefix: "[workflow-name] "
838+
expires: 7 # auto-close after 7 days
839+
```
840+
Without `skip-if-match`, a scheduled workflow that creates issues will open a new issue on every run even if an identical issue is already open.
831841
- **New workflows** (when creating, not updating): Consider enabling `missing-tool: create-issue: true` to automatically track missing tools as GitHub issues that expire after 1 week
832842
5. **Permissions**: Start with `permissions: read-all` and only add specific write permissions if absolutely necessary
833843
6. **Repository Access Roles**: Consider who should be able to trigger the workflow:

.github/aw/github-agentic-workflows.md

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)