mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-01 19:48:28 +01:00
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.
39 lines
1.0 KiB
YAML
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 }}
|