Skip to content

Duplicate Issue Detector

Check whether a newly opened issue is a duplicate of an existing open or previously closed issue, and notify the reporter.

How it works

When a new issue is opened, searches both open and closed issues using multiple targeted queries derived from the issue title and body. Posts a notice on the issue only when a strong duplicate match is found.

Quick Install

mkdir -p .github/workflows && curl -sL \
  https://raw.githubusercontent.com/elastic/ai-github-actions/v0/gh-agent-workflows/duplicate-issue-detector/example.yml \
  -o .github/workflows/duplicate-issue-detector.yml

Trigger

Event Types
issues opened

Inputs

Input Description Required Default
additional-instructions Repo-specific instructions appended to the agent prompt No ""
allowed-bot-users Allowlisted bot actor usernames (comma-separated) No github-actions[bot]

Safe Outputs

  • add-comment — post a duplicate notice on the issue when a matching issue is found

Example Workflow

name: Duplicate Issue Detector
on:
  issues:
    types: [opened]

permissions:
  contents: read
  discussions: write
  issues: write
  pull-requests: write  # required by gh-aw compiler for add-comment (github/gh-aw#16673)

jobs:
  run:
    uses: elastic/ai-github-actions/.github/workflows/gh-aw-duplicate-issue-detector.lock.yml@v0
    secrets:
      COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}