-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'vishanurag:main' into auth
- Loading branch information
Showing
19 changed files
with
878 additions
and
1,065 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Duplicate Issue Detector | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
detect-duplicate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Detect duplicate issues | ||
id: detect | ||
uses: actions-cool/issues-similarity-analysis@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
owner: ${{ github.repository_owner }} | ||
repo: ${{ github.event.repository.name }} | ||
threshold: 0.7 # Similarity threshold; adjust as needed | ||
label: duplicate | ||
close: true | ||
|
||
- name: Comment on Duplicate Issue | ||
if: steps.detect.outputs.duplicate == 'true' | ||
run: | | ||
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \ | ||
-d '{"body": "This issue is a duplicate of #${{ steps.detect.outputs.original_issue_number }}. Please refer to the original issue for updates."}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.