Repository navigation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Suppress unenforceable action-failure expiry markers when no maintenance workflow will exist to close them #51425
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
Uh oh!
There was an error while loading. Please reload this page.
Suppress unenforceable action-failure expiry markers when no maintenance workflow will exist to close them #51425
Changes from 3 commits
b2754cd90eb2a6fbd021c42eb6d96e679339300e4dFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
[/diagnosing-bugs] The expiration check uses
<= Date.now()(expired at or before now), which is correct. However, the branch that fetches the full issue body on a truncated search result has no error handling — ifgithub.rest.issues.getthrows (e.g. rate-limit, network error), the exception propagates uncaught up throughensureParentIssue, potentially aborting the entire grouped-issue flow rather than gracefully falling back to creating a new parent.💡 Suggestion
Treating a fetch failure as "not expired" is conservative and mirrors the existing pattern of falling through to sub-issue count checks when data is unavailable.
@copilot please address this.
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.
[/diagnosing-bugs]
strings.ReplaceAllmatches the exact stringGH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "168". IfDefaultActionFailureIssueExpiresHoursever changes, lock files compiled with the old default will silently be missed — no patch, no warning, unenforceable marker lives on.💡 Suggestion
Match the non-zero value with a regex instead:
This patches any positive default regardless of its numeric value, and removes the coupling to
DefaultActionFailureIssueExpiresHoursat patch-time.@copilot please address this.
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.
[/diagnosing-bugs]
anyWorkflowMayReportFailureAsIssuereturns!sawAny(i.e.true) when the list is empty. An emptyworkflowDataListpassed toscanWorkflowsForExpireswould therefore treat an explicitaction_failure_issue_expiresas an opt-in trigger even though there are no workflows to create failure issues — generating a maintenance workflow for no reason.💡 Suggestion
Return
false(nottrue) whensawAnyis false — an empty list cannot produce failure issues:Add a unit test:
scanWorkflowsForExpires(nil, repoConfigWithExplicit)should returnhasExpires=false.@copilot please address this.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.