Skip to content

prosyslab/dude-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dude

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.

Inputs

issue_num

Required The issue's number of which has been newly created.

issue_contents

Required The issue's contents of which has been newly created.

repository_path_name

Required The repository's path name.

rapid_key

Required API Key of RapidAPI. You should pass this using GitHub Secrets. Refer to this link.

repo_key

Required GitHub token. You could use pre-defined GitHub Secrets. Refer to this link. Or, you can use your own GitHub token.

threshold

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.

Outputs

dup_num

If any possible duplication is deteced, it will contains the issue number of it. Otherwise, it will be -1.

Additional Information

For dude to act properly, you should make sure setting action's permission well at the repository's settings.

  1. Go to Settings of your repository.
  2. At the Code and automation tab, click Actions/General.
  3. At the Workflow permission tab, check Read and write permission.

Without this, our action cannot leave a comment even if it detects duplications.

Example Usage

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

Plans for Updates

  • 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.