Skip duplicate generated issues after unmerged Copilot PRs - #55627
Merged
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Skip duplicate auto-generated issues for closed WIP PRs
Skip duplicate generated issues after unmerged Copilot PRs
Aug 25, 2026
pelikhan
marked this pull request as ready for review
August 25, 2026 04:43
Copilot stopped reviewing on behalf of
pelikhan due to an error
August 25, 2026 04:44
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.
Adds guidance and enforcement to reduce repeated/invalid automation attempts by introducing a “retry guard” based on prior closed PRs and adding a strict-mode policy check in a locked workflow, with regenerated lock metadata.
Changes:
- Documented a retry guard to skip issue creation when a matching prior PR was closed unmerged.
- Updated workflow lock(s) metadata and introduced a strict-mode policy enforcement step.
- Regenerated lock files to reflect updated compiled content/hashes and strict compilation state.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/workflow-normalizer.md | Adds retry-guard instructions to avoid re-creating issues when prior PRs were closed unmerged. |
| .github/workflows/workflow-normalizer.lock.yml | Regenerated lock metadata (hash/format update). |
| .github/workflows/daily-team-evolution-insights.lock.yml | Switches compiled strict flag to false and adds a strict-mode policy enforcement step. |
| .github/workflows/daily-geo-optimizer.md | Adds retry-guard instructions mirroring workflow-normalizer.md. |
| .github/workflows/daily-geo-optimizer.lock.yml | Regenerated lock metadata (hash update). |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 5/5 changed files
- Comments generated: 3
- Review effort level: Lite
| const { main } = require(path.join(actionsDir, 'generate_aw_info.cjs')); | ||
| await main(core, context); | ||
| - name: Enforce strict mode policy | ||
| if: ${{ vars.GH_AW_POLICY_STRICT == 'true' }} |
|
|
||
| ### Retry guard | ||
|
|
||
| Before creating the issue, query closed pull requests with `gh pr list --state closed --author Copilot --limit 1000 --json number,title,closedAt,mergedAt`. Normalize both the candidate title and each PR title by repeatedly removing leading bracketed prefixes (for example `[geo-optimizer]` or `[WIP]`), lowercasing, replacing non-alphanumeric runs with one space, and trimming. |
Comment on lines
+120
to
+122
| Before creating the issue, query closed pull requests with `gh pr list --state closed --author Copilot --limit 1000 --json number,title,closedAt,mergedAt`. Normalize both the candidate title and each PR title by repeatedly removing leading bracketed prefixes (for example `[workflow-style]` or `[WIP]`), lowercasing, replacing non-alphanumeric runs with one space, and trimming. | ||
|
|
||
| If any normalized title matches the candidate and `mergedAt` is null, do **not** create the issue. Use `noop` instead, naming the matching PR numbers and close dates. Do not treat a closed PR as a reason to retry automatically; a maintainer must create or approve a follow-up issue after reviewing the prior attempt. |
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Recurring GEO and workflow-style generators could recreate issues whose prior Copilot implementations were closed unmerged, causing repeated empty WIP PR attempts.
noopwith prior PR numbers and close dates when an unmerged title match exists.