Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/prompts/issue-deduplicator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ You will receive the following JSON files located in the current working directo
- `codex-existing-issues.json`: JSON array of recent issues (each element includes number, title, body, createdAt).

Instructions:
- Load both files as JSON and review their contents carefully.
- Load both files as JSON and review their contents carefully. The codex-existing-issues.json file is large, ensure you explore all of it.
- Compare the current issue against the existing issues to find up to five that appear to describe the same underlying problem or request.
- Only consider an issue a potential duplicate if there is a clear overlap in symptoms, feature requests, reproduction steps, or error messages.
- Prioritize newer issues when similarity is comparable.
Expand All @@ -16,4 +16,3 @@ Output requirements:
- Respond with a JSON array of issue numbers (integers), ordered from most likely duplicate to least.
- Include at most five numbers.
- If you find no plausible duplicates, respond with `[]`.
- Do not emit any additional commentary, text, or keys beyond the JSON array.
6 changes: 6 additions & 0 deletions .github/workflows/issue-deduplicator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ jobs:
return;
}

if (numbers.length === 0) {
core.info('Codex reported no potential duplicates.');
return;
}

const lines = ['Potential duplicates detected:', ...numbers.map((value) => `- #${value}`)];

await github.rest.issues.createComment({
Expand All @@ -83,6 +88,7 @@ jobs:
if: ${{ always() && github.event.action == 'labeled' && github.event.label.name == 'codex-deduplicate' }}
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh issue edit "${{ github.event.issue.number }}" --remove-label codex-deduplicate || true
echo "Attempted to remove label: codex-deduplicate"
Loading