Skip to content

feat: add duplicate-resolver agentic workflow - #2484

Closed
lpcox with Copilot wants to merge 1 commit into
mainfrom
copilot/create-pr-for-duplicate-issues
Closed

feat: add duplicate-resolver agentic workflow#2484
lpcox with Copilot wants to merge 1 commit into
mainfrom
copilot/create-pr-for-duplicate-issues

Conversation

Copilot AI commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new agentic workflow (.github/workflows/duplicate-resolver.md) that automatically creates a PR to fix code duplication whenever an issue with [Duplicate] in its title is opened.

What the workflow does

Trigger Behaviour
issues: opened (title contains [Duplicate]) Reads that issue, analyses the duplicated code, implements the refactor, and opens a fix PR
workflow_dispatch Searches for the highest-priority open [Duplicate] issue without an existing fix PR and processes it

Agent steps

  1. Identify the issue to resolve (from event or via GitHub search)
  2. Guard against duplicate PRs — skips if a fix PR already exists
  3. Analyse the codebase (reads files, greps for occurrences, understands callers)
  4. Implement the refactoring using the edit tool
  5. Verify with npm run build, npm run test, npm run lint
  6. Create a PR via the create-pull-request safe-output (auto-closes the source issue on merge)

Key configuration choices

  • if: expression filters issues events to only those whose titles contain [Duplicate] — other issue events are ignored
  • auto-close-issue: true — the fix PR automatically closes the tracking issue when merged
  • draft: false — PRs are opened as ready-for-review since the agent runs full verification before creating them
  • reviewers: copilot — adds Copilot as a reviewer for a second-pass check
  • bash: true — broad bash access is appropriate because this is a scheduled/dispatch-class workflow processing trusted internal issue content

Files changed

  • .github/workflows/duplicate-resolver.md — workflow source
  • .github/workflows/duplicate-resolver.lock.yml — compiled GitHub Actions YAML (generated by gh aw compile duplicate-resolver)

Agent-Logs-Url: https://github.com/github/gh-aw-firewall/sessions/a409138a-79f6-4213-828d-4af6c24e3cd2

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
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.

2 participants