Files
streamyfin/.github/workflows/detect-duplicate.yml
Gauvino d2c48de60d ci(issues): flag likely-duplicate issues on open
Adds .github/workflows/detect-duplicate.yml + scripts/detect-duplicate-issue.mjs
(Bun, dep-free, no API key): on a new issue, compares its title/body to open
issues via Jaccard similarity (with light stemming and stop-words), and if the
top matches pass a threshold, posts one comment listing them and adds a
'possible duplicate' label. Inspired by seerr's detect-duplicate, minus the
embedding/Groq dependency.
2026-06-01 17:38:19 +02:00

39 lines
1.0 KiB
YAML

name: 🔁 Detect Duplicate Issues
on:
issues:
types: [opened]
permissions:
contents: read
concurrency:
group: detect-duplicate-${{ github.event.issue.number }}
cancel-in-progress: true
jobs:
detect:
name: 🔍 Find similar issues
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-24.04
permissions:
issues: write
contents: read
steps:
- name: 📥 Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: 🍞 Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest
- name: 🔍 Detect duplicate issues
run: bun scripts/detect-duplicate-issue.mjs
env:
GH_TOKEN: ${{ github.token }}
GITHUB_REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}