Deduplicator fixes (#4635)
This commit is contained in:
3
.github/prompts/issue-deduplicator.txt
vendored
3
.github/prompts/issue-deduplicator.txt
vendored
@@ -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).
|
- `codex-existing-issues.json`: JSON array of recent issues (each element includes number, title, body, createdAt).
|
||||||
|
|
||||||
Instructions:
|
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.
|
- 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.
|
- 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.
|
- Prioritize newer issues when similarity is comparable.
|
||||||
@@ -16,4 +16,3 @@ Output requirements:
|
|||||||
- Respond with a JSON array of issue numbers (integers), ordered from most likely duplicate to least.
|
- Respond with a JSON array of issue numbers (integers), ordered from most likely duplicate to least.
|
||||||
- Include at most five numbers.
|
- Include at most five numbers.
|
||||||
- If you find no plausible duplicates, respond with `[]`.
|
- If you find no plausible duplicates, respond with `[]`.
|
||||||
- Do not emit any additional commentary, text, or keys beyond the JSON array.
|
|
||||||
|
|||||||
6
.github/workflows/issue-deduplicator.yml
vendored
6
.github/workflows/issue-deduplicator.yml
vendored
@@ -73,6 +73,11 @@ jobs:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (numbers.length === 0) {
|
||||||
|
core.info('Codex reported no potential duplicates.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const lines = ['Potential duplicates detected:', ...numbers.map((value) => `- #${value}`)];
|
const lines = ['Potential duplicates detected:', ...numbers.map((value) => `- #${value}`)];
|
||||||
|
|
||||||
await github.rest.issues.createComment({
|
await github.rest.issues.createComment({
|
||||||
@@ -86,6 +91,7 @@ jobs:
|
|||||||
if: ${{ always() && github.event.action == 'labeled' && github.event.label.name == 'codex-deduplicate' }}
|
if: ${{ always() && github.event.action == 'labeled' && github.event.label.name == 'codex-deduplicate' }}
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
run: |
|
run: |
|
||||||
gh issue edit "${{ github.event.issue.number }}" --remove-label codex-deduplicate || true
|
gh issue edit "${{ github.event.issue.number }}" --remove-label codex-deduplicate || true
|
||||||
echo "Attempted to remove label: codex-deduplicate"
|
echo "Attempted to remove label: codex-deduplicate"
|
||||||
|
|||||||
Reference in New Issue
Block a user