This action is triggered when a new issue has been created. Then it compares the new issue's contents with existing issues' contents, and detect possible duplications. If any possible duplication is detected, it will inform the issuer through comment.
Required The issue's number of which has been newly created.
Required The issue's contents of which has been newly created.
Required The repository's path name.
Required API Key of RapidAPI. You should pass this using GitHub Secrets. Refer to this link.
Required GitHub token. You could use pre-defined GitHub Secrets. Refer to this link. Or, you can use your own GitHub token.
Threshold similarity to use for the detection. You should provide the valid number(0.0 ~ 1.0) only. If it is not specified, then it will be 0.20.
If any possible duplication is deteced, it will contains the issue number of it. Otherwise, it will be -1.
For dude to act properly, you should make sure setting action's permission well at the repository's settings.
- Go to
Settings
of your repository. - At the
Code and automation
tab, clickActions/General
. - At the
Workflow permission
tab, checkRead and write permission
.
Without this, our action cannot leave a comment even if it detects duplications.
env:
rapid_key: ${{ secrets.RAPID_KEY }}
repo_key: ${{ secrets.GITHUB_TOKEN }}
...
uses: prosyslab/[email protected]
with:
issue_num: ${{ github.event.issue.number }}
issue_contents: ${{ github.event.issue.body }}
repository_path_name: ${{ github.repository }}
rapid_key: ${{ env.rapid_key }}
repo_key: ${{ env.repo_key }}
threshold: 0.2 # default: 0.2
- There are several convenience functions we are currently planning to supports:
- Using tags, include & exclude some issues from scanning.
- Set default threshold value by inital scanning.
- Provide several options to scan & return.