Add agentic Duplicate Surfacing workflow (#299) - #300
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
This comment has been minimized.
This comment has been minimized.
Ports the gh-aw Duplicate Surfacing workflow from microsoft/winget-cli (PRs #6400, #6408, #6410) and the winget-create pilot (#687) to winget-dsc. On newly opened issues, an agent searches existing issues and, when it finds a likely duplicate, applies the Possible-Duplicate label and posts an advisory comment for maintainer review. It never closes issues or applies duplicate-close triggers (detect-only). Includes both winget-cli refinements: no-op runs are not reported as tracking issues (noop.report-as-issue: false), and search guidance mandates high-recall in:title queries to surface old, sparse-body duplicates. - Excludes the generated gh-aw artifacts (.github/aw/, *.lock.yml) from Check Spelling, and the workflow prompt .md from markdownlint (.github/workflows/*.md), since both are machine-authored. - Adds autodetect, noop, PreIndexedPackage, toolsets, and NNN to the spelling allow list for the workflow prompt text. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3701d64a-96ba-42f1-be59-b4e7d2a2820a
5d1cc1e to
0284000
Compare
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Agentic Workflows-based “Duplicate Surfacing” automation to help maintainers identify likely duplicate issues by searching existing issues and (when confident) posting a single “Possible duplicate(s)” comment and applying a Possible-Duplicate label.
Changes:
- Introduces the Duplicate Surfacing agentic workflow source (
.md) and its generated compiled workflow (.lock.yml). - Updates repo quality gates to ignore agentic workflow sources/outputs where appropriate (markdownlint + check-spelling allow/exclude updates).
- Adds generated-artifact handling metadata (Linguist generated marking via
.gitattributes) and pins agentic action SHAs (.github/aw/actions-lock.json).
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .markdownlint-cli2.yaml | Ignores .github/workflows/*.md from markdownlint checks. |
| .github/workflows/duplicate-surfacing.md | Adds the agentic workflow prompt/policy for duplicate surfacing. |
| .github/workflows/duplicate-surfacing.lock.yml | Adds the generated compiled GitHub Actions workflow implementing the agentic run. |
| .github/aw/actions-lock.json | Adds pinned SHA mapping for the gh-aw setup action. |
| .github/actions/spelling/excludes.txt | Excludes agentic workflow generated artifacts and .github/aw/ from spelling checks. |
| .github/actions/spelling/allow.txt | Allows workflow-specific tokens (e.g., autodetect, noop, NNN, toolsets). |
| .gitattributes | Marks *.lock.yml as generated (and currently configures a merge driver). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .github/actions/spelling/** text eol=lf | ||
| *.winget linguist-language=yaml | ||
|
|
||
| .github/workflows/*.lock.yml linguist-generated=true merge=ours No newline at end of file |
There was a problem hiding this comment.
This is the standard gh-aw-generated .gitattributes line and is intentionally kept identical to the canonical winget-cli repo (where the Duplicate Surfacing workflow was first landed in #6414). An unconfigured ours merge driver only produces a warning and falls back to the default merge — it's non-fatal — and .lock.yml is a generated artifact that's regenerated by gh aw compile anyway. Keeping this line consistent across the winget repo family (rather than dropping it in just this repo) avoids drift. No change here.
📖 Description
Adds the agentic Duplicate Surfacing workflow to winget-dsc, matching the implementation shipped in winget-cli and piloted in winget-create (microsoft/winget-create#687).
On newly opened issues, the workflow searches existing issues (open and closed) for likely duplicates by meaning. When it has at least one high-confidence candidate, it posts a single comment listing the candidates and applies the
Possible-Duplicatelabel. It never closes issues, removesNeeds-Triage, or posts theDuplicate of #NNNmoderator trigger — the close decision stays with a human.This lands with the #6412 comment-cleanup refinements already baked in (see microsoft/winget-cli#6414): friendly contributor-facing guidance and a consolidated H6
Templatefooter with a run link.Files
.github/workflows/duplicate-surfacing.md— GitHub Agentic Workflow source..github/workflows/duplicate-surfacing.lock.yml— compiled workflow (generated bygh aw compile)..github/aw/actions-lock.json— pinned action SHAs (generated)..gitattributes— marks the generated.lock.ymlaslinguist-generated..github/actions/spelling/{allow.txt,excludes.txt}— spelling excludes for.github/aw/and the generated*.lock.yml, plus allow tokens (autodetect,noop,PreIndexedPackage,toolsets,NNN)..markdownlint-cli2.yaml— ignore.github/workflows/*.md(the workflow prompt isn't standard prose).Rendered comment
🔗 References
Resolves #299
Follows microsoft/winget-cli (Duplicate Surfacing) and microsoft/winget-create#687; comment cleanup per microsoft/winget-cli#6412 / microsoft/winget-cli#6414
🔍 Validation
gh aw compile duplicate-surfacing→ 0 errors, 0 warnings..md) was validated live in a private demo repo: it posted the exact comment above (header + guidance + H6 footer with the run URL rendered) and applied thePossible-Duplicatelabel.github/gh-aw-actions/*,check-spelling/*,DavidAnson/markdownlint-cli2-action/*,tj-actions/changed-files/*). Requires an admin to lock downselectedactions (tracked separately).✅ Checklist
📋 Issue Type
Authored with GitHub Copilot assistance.
Microsoft Reviewers: Open in CodeFlow