Skip to content

Add PR Duplicate Check agentic workflow#954

Draft
Copilot wants to merge 2 commits intostagedfrom
copilot/add-duplicate-check-on-pr
Draft

Add PR Duplicate Check agentic workflow#954
Copilot wants to merge 2 commits intostagedfrom
copilot/add-duplicate-check-on-pr

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

Summary

Adds a new GitHub Agentic Workflow (pr-duplicate-check) that proactively checks for potential duplicate resources when a PR is opened or updated, addressing the need described in the problem statement.

What it does

When a pull request is opened, synchronized, or reopened, the workflow:

  1. Identifies relevant files in the PR that belong to agents/, instructions/, skills/, or workflows/ directories
  2. Reads metadata (name, description, first ~20 lines) from each new/modified resource
  3. Compares against all existing resources in the repo using the same multi-signal duplicate detection logic as the weekly duplicate-resource-detector workflow
  4. Posts a PR comment listing any potential duplicate groups with context and a suggestion — if any are found
  5. Calls noop if no relevant files changed or no duplicates were found

Files added

  • .github/workflows/pr-duplicate-check.md — gh-aw source workflow with instructions for the AI agent
  • .github/workflows/pr-duplicate-check.lock.yml — compiled workflow (adapted from duplicate-resource-detector.lock.yml) with:
    • pull_request trigger (opened, synchronize, reopened)
    • add-comment safe output (posts/updates a single PR comment)
    • repos + pull_requests GitHub MCP toolsets
    • pull-requests: write permission for commenting

Relationship to existing weekly workflow

The weekly duplicate-resource-detector does a full repo scan and creates a GitHub Issue. This new workflow is complementary — it's scoped to just the files in the current PR and comments directly on that PR, giving contributors immediate feedback at contribution time.

Copilot AI and others added 2 commits March 10, 2026 05:02
Adds a new GitHub Agentic Workflow that triggers on pull_request
events (opened, synchronize, reopened) to detect potential duplicate
agents, instructions, skills, and workflows being contributed via PR.

When relevant files are changed, the agent compares them against
existing resources and posts a comment on the PR listing any potential
duplicates with context and a suggestion. If no relevant files are
changed or no duplicates are found, it calls noop.

- .github/workflows/pr-duplicate-check.md: source workflow (gh-aw format)
- .github/workflows/pr-duplicate-check.lock.yml: compiled workflow

Co-authored-by: aaronpowell <434140+aaronpowell@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