mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-04-24 23:56:21 +02:00
Replace the copilot-generated inline search logic with a claude-code-action based architecture inspired by anthropic/claude-code's approach: - Add .claude/commands/dedupe.md with 5-parallel-search strategy - Add scripts/comment-on-duplicates.sh with 3-day grace period warning - Rewrite issue-dedupe.yml to use claude-code-action + /dedupe command - Rewrite autoclose script to check bot comments, human activity, and thumbsdown - Rewrite backfill to trigger dedupe workflow per issue with rate limiting - Add concurrency control, timeout, input validation, and rate limit retry - Remove gh.sh (unnecessary), backfill-dedupe.js (replaced by workflow trigger)
56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
# Detects duplicate issues using Claude Code with the /dedupe command.
|
|
# Triggered automatically when a new issue is opened, or manually for a single issue.
|
|
name: Issue Duplicate Detection
|
|
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
workflow_dispatch:
|
|
inputs:
|
|
issue_number:
|
|
description: 'Issue number to check for duplicates'
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
|
|
concurrency:
|
|
group: dedupe-${{ github.event.issue.number || inputs.issue_number }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
detect-duplicate:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
# Skip pull-requests that surface as issues and bot-opened issues
|
|
if: >
|
|
(github.event_name == 'workflow_dispatch') ||
|
|
(github.event.issue.pull_request == null &&
|
|
!endsWith(github.actor, '[bot]') &&
|
|
github.actor != 'github-actions')
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Determine issue number
|
|
id: issue
|
|
env:
|
|
EVENT_NAME: ${{ github.event_name }}
|
|
INPUT_NUMBER: ${{ inputs.issue_number }}
|
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
|
run: |
|
|
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
|
|
echo "number=$INPUT_NUMBER" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "number=$ISSUE_NUMBER" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- uses: anthropics/claude-code-action@v1
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
prompt: "/dedupe ${{ github.repository }}/issues/${{ steps.issue.outputs.number }}"
|
|
anthropic_api_key: ${{ secrets.AUTHROPIC_API_KEY }}
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
claude_args: "--model claude-sonnet-4-5-20250929"
|