-
Notifications
You must be signed in to change notification settings - Fork 295
Description
Problem
close-older-issues currently dedupes/closures based on workflow markers (gh-aw-workflow-id / gh-aw-workflow-call-id).
For reusable workflows invoked via workflow_call, multiple caller workflows in the same repo can still collide when marker identity is not unique enough for the caller context. We observed issues from different caller workflows closing each other.
Recent history suggests this area is sensitive:
- fix: prevent close-older-issues from closing issues across different calling workflows #19200 (added caller marker usage to prevent cross-caller closes)
- Use workflow filename (not display name) as caller workflow ID #19408 (changed caller marker source for stability)
The current behavior makes it hard for users to guarantee isolated close-older streams per logical workflow.
Proposal
Add an optional explicit custom key for close-older matching.
Suggested config
For create-issue and create-discussion, support something like:
safe-outputs:
create-issue:
close-older-issues: true
close-older-key: "my-stable-dedupe-key"(Equivalent field for discussions.)
Semantics
- If
close-older-keyis set:- emit marker:
<!-- gh-aw-close-key: <value> --> - use this marker as the primary key for close-older selection
- emit marker:
- If not set:
- preserve existing behavior and marker precedence (backward compatible)
Why this helps
- Gives users deterministic isolation across caller workflows
- Works even if caller identity inference changes over time
- Lets teams intentionally set the key to title prefix (or any convention) when desired, while still using exact marker matching in bodies instead of fuzzy title search
Backward compatibility
No behavior change for existing workflows unless close-older-key is provided.