mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-04-26 00:26:21 +02:00
Refactor issue dedup system to use claude-code-action with /dedupe command
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)
This commit is contained in:
parent
b3cb9531a4
commit
fd9330c434
8 changed files with 413 additions and 752 deletions
41
.github/workflows/remove-autoclose-label.yml
vendored
41
.github/workflows/remove-autoclose-label.yml
vendored
|
|
@ -1,6 +1,8 @@
|
|||
# Removes the "autoclose" label whenever a human (non-bot) posts a new comment
|
||||
# on an issue that carries the label. This resets the inactivity clock.
|
||||
name: Remove Autoclose Label on Human Activity
|
||||
# Removes the "duplicate" label when a human (non-bot) comments on a
|
||||
# duplicate-flagged issue, signaling that the issue needs re-evaluation.
|
||||
# The auto-close script also independently checks for human activity,
|
||||
# so this provides an additional visible signal.
|
||||
name: Remove Duplicate Label on Human Activity
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
|
|
@ -10,39 +12,34 @@ permissions:
|
|||
issues: write
|
||||
|
||||
jobs:
|
||||
remove-autoclose:
|
||||
remove-label:
|
||||
# Only run for issue comments (not PR comments)
|
||||
if: ${{ github.event.issue.pull_request == null }}
|
||||
if: >
|
||||
github.event.issue.pull_request == null &&
|
||||
!endsWith(github.actor, '[bot]') &&
|
||||
github.actor != 'github-actions'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Remove autoclose label if human commented
|
||||
- name: Remove duplicate label if human commented
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const actor = context.actor;
|
||||
|
||||
// Ignore bot accounts
|
||||
if (actor.endsWith('[bot]') || actor === 'github-actions') {
|
||||
core.info(`Skipping bot comment from ${actor}`);
|
||||
return;
|
||||
}
|
||||
|
||||
const issue = context.payload.issue;
|
||||
const issue = context.payload.issue;
|
||||
const labels = (issue.labels || []).map(l => l.name);
|
||||
|
||||
if (!labels.includes('autoclose')) {
|
||||
core.info('Issue does not have "autoclose" label – nothing to do.');
|
||||
if (!labels.includes('duplicate')) {
|
||||
core.info('Issue does not have "duplicate" label - nothing to do.');
|
||||
return;
|
||||
}
|
||||
|
||||
await github.rest.issues.removeLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: issue.number,
|
||||
name: 'autoclose',
|
||||
name: 'duplicate',
|
||||
});
|
||||
|
||||
core.info(
|
||||
`Removed "autoclose" label from #${issue.number} ` +
|
||||
`after human activity by ${actor}`
|
||||
`Removed "duplicate" label from #${issue.number} ` +
|
||||
`after human comment by ${context.actor}`
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue