Skip to content

Skip duplicate generated issues after unmerged Copilot PRs - #55627

Merged
pelikhan merged 3 commits into
mainfrom
copilot/copilot-opt-skip-duplicate-issues
Aug 25, 2026
Merged

pelikhan merged 3 commits into
mainfrom
copilot/copilot-opt-skip-duplicate-issues

Conversation

Copilot AI commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Recurring GEO and workflow-style generators could recreate issues whose prior Copilot implementations were closed unmerged, causing repeated empty WIP PR attempts.

  • GEO optimizer
    • Checks closed Copilot PRs before creating its highest-impact improvement issue.
  • Workflow normalizer
    • Applies the same check before creating its consolidated formatting issue.
  • Retry guard
    • Normalizes titles by removing bracketed prefixes, lowercasing, and collapsing punctuation.
    • Emits noop with prior PR numbers and close dates when an unmerged title match exists.
    • Requires maintainer review or approval before a follow-up issue is generated.
[WIP] Create /llms.txt for the documentation site
[geo-optimizer] Create /llms.txt for the documentation site
→ create llms txt for the documentation site

Copilot AI and others added 2 commits August 25, 2026 04:19
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
Copilot AI requested a review from pelikhan August 25, 2026 04:27
@pelikhan
pelikhan marked this pull request as ready for review August 25, 2026 04:43
Copilot AI balanced review requested due to automatic review settings August 25, 2026 04:43
@pelikhan
pelikhan merged commit 64b1d73 into main Aug 25, 2026
2 checks passed
@pelikhan
pelikhan deleted the copilot/copilot-opt-skip-duplicate-issues branch August 25, 2026 04:43
Copilot stopped reviewing on behalf of pelikhan due to an error August 25, 2026 04:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[copilot-opt] Skip duplicate auto-generated issues when prior WIP PR on the same topic was closed unmerged

3 participants