{"id":28953719,"url":"https://github.com/pelikhan/action-genai-issue-dedup","last_synced_at":"2025-06-23T18:30:50.533Z","repository":{"id":296498698,"uuid":"993584415","full_name":"pelikhan/action-genai-issue-dedup","owner":"pelikhan","description":"Searches for duplicate issues.","archived":false,"fork":false,"pushed_at":"2025-06-12T04:42:42.000Z","size":249,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T05:35:09.176Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pelikhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-31T04:28:13.000Z","updated_at":"2025-06-12T04:42:45.000Z","dependencies_parsed_at":"2025-05-31T16:56:53.728Z","dependency_job_id":"bb402f94-41e3-423d-865d-c5a3f0d3da4c","html_url":"https://github.com/pelikhan/action-genai-issue-dedup","commit_stats":null,"previous_names":["pelikhan/action-genai-issue-dedup"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/pelikhan/action-genai-issue-dedup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Faction-genai-issue-dedup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Faction-genai-issue-dedup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Faction-genai-issue-dedup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Faction-genai-issue-dedup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pelikhan","download_url":"https://codeload.github.com/pelikhan/action-genai-issue-dedup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Faction-genai-issue-dedup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261533697,"owners_count":23173271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-23T18:30:48.263Z","updated_at":"2025-06-23T18:30:50.486Z","avatar_url":"https://github.com/pelikhan.png","language":"TypeScript","funding_links":[],"categories":["Categories"],"sub_categories":["Continuous Triage"],"readme":"This action is designed to find duplicate issues in a GitHub repository using a GenAI model. It retrieves the current issue and compares it against other issues in the repository, leveraging LLM reasoning to determine if they are duplicates.\n\n\u003e [!NOTE]\n\u003e This action uses [GitHub Models](https://github.com/models) for LLM inference.\n\n## Algorithm\n\nThe deduplication algorithm implemented in `genaisrc/action.genai.mts` operates as follows:\n\n- **Issue Retrieval**: The script retrieves the current issue and a configurable set of other issues from the repository, filtered by state, labels, creation date, and count. The current issue is excluded from the comparison set.\n\n- **Batch detection using small LLM**: For each group of issues, the script constructs a prompt that defines the current issue and the group of other issues (grouped to fit in the context window). The prompt instructs the **small** LLM to compare the current issue against each candidate, providing a CSV output with the issue number, reasoning, and a verdict (`DUP` for duplicate, `UNI` for unique).\n\n- **Single duplicate validation using large LLM**: If the LLM identifies duplicates, the script runs a validation LLM prompt using a **large** model to confirm the duplicate hit.\n\n- **Result Output**: If duplicates are found, their issue numbers and titles are output. If no duplicates are found, the action is cancelled with an appropriate message.\n\n\n\n## Inputs\n\n- `count`: Number of issues to check for duplicates (default: `30`)\n- `since`: Only check issues created after this date (ISO 8601 format)\n- `labels`: List of labels to filter issues by\n- `state`: State of the issues to check (open, closed, all) (default: `open`)\n- `max_duplicates`: Maximum number of duplicates to check for (default: `3`)\n- `tokens_per_issue`: Number of tokens to use for each issue when checking for duplicates (default: `1000`)\n- `label_as_duplicate`: Add `duplicate` label to issues that are found to be duplicates (default: `false`)\n\n- `github_token`: GitHub token with `models: read` permission at least (https://microsoft.github.io/genaiscript/reference/github-actions/#github-models-permissions). (required)\n- `debug`: Enable debug logging (https://microsoft.github.io/genaiscript/reference/scripts/logging/).\n\n## Usage\n\nAdd the following to your step in your workflow file:\n\n```yaml\n---\npermissions:\n  models: read\n  issues: write\n---\nsteps:\n  - uses: pelikhan/action-genai-issue-dedup@v0\n    with:\n      github_token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## Example\n\nSave this file under `.github/workflows/genai-issue-dedup.yml` in your repository:\n\n```yaml\nname: GenAI Find Duplicate Issues\non:\n  issues:\n    types: [opened, reopened]\npermissions:\n  models: read\n  issues: write\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.issue.number }}\n  cancel-in-progress: true\njobs:\n  genai-issue-dedup:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Run action-issue-dedup Action\n        uses: pelikhan/action-genai-issue-dedup@v0\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## Development\n\nThis action was automatically generated by GenAIScript from the script metadata.\nWe recommend updating the script metadata instead of editing the action files directly.\n\n- the action inputs are inferred from the script parameters\n- the action outputs are inferred from the script output schema\n- the action description is the script title\n- the readme description is the script description\n- the action branding is the script branding\n\nTo **regenerate** the action files (`action.yml`), run:\n\n```bash\nnpm run configure\n```\n\nTo lint script files, run:\n\n```bash\nnpm run lint\n```\n\nTo typecheck the scripts, run:\n\n```bash\nnpm run typecheck\n```\n\nTo build the Docker image locally, run:\n\n```bash\nnpm run docker:build\n```\n\nTo run the action locally in Docker (build it first), use:\n\n```bash\nnpm run docker:start\n```\n\nTo run the action using [act](https://nektosact.com/), first install the act CLI:\n\n```bash\nnpm run act:install\n```\n\nThen, you can run the action with:\n\n```bash\nnpm run act\n```\n\n## Upgrade\n\nThe GenAIScript version is pinned in the `package.json` file. To upgrade it, run:\n\n```bash\nnpm run upgrade\n```\n\n## Release\n\nTo release a new version of this action, run the release script on a clean working directory.\n\n```bash\nnpm run release\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelikhan%2Faction-genai-issue-dedup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpelikhan%2Faction-genai-issue-dedup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelikhan%2Faction-genai-issue-dedup/lists"}