-
Notifications
You must be signed in to change notification settings - Fork 368
docs: strengthen skip-if-match guidance for scheduled issue-creating workflows #28545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -828,6 +828,16 @@ Based on the parsed requirements, determine: | |
| - **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. | ||
| - **Daily reporting workflows** (creates issues/discussions): Add `close-older-issues: true` or `close-older-discussions: true` to prevent clutter | ||
| - **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: | ||
| 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 | ||
|
Comment on lines
+834
to
+838
|
||
| ``` | ||
| 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. | ||
| - **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 | ||
| 5. **Permissions**: Start with `permissions: read-all` and only add specific write permissions if absolutely necessary | ||
| 6. **Repository Access Roles**: Consider who should be able to trigger the workflow: | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
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 onlyskip-if-match, but no actual trigger (e.g.,schedule:). Sinceskip-if-matchis a modifier rather than a trigger, copying this example would produce invalid frontmatter / a compile error. Add aschedule:line (and optionally show it combined withskip-if-match) to make the example runnable.