|
| 1 | +name: "Issue Labeler" |
| 2 | +on: |
| 3 | + issues: |
| 4 | + types: |
| 5 | + - opened |
| 6 | + - reopened |
| 7 | + - edited |
| 8 | + |
| 9 | +jobs: |
| 10 | + # When an issue is opened, perform a similarity check for potential duplicates. |
| 11 | + # If some are found, add a label and comment listing the potential duplicate issues. |
| 12 | + potential-duplicate: |
| 13 | + name: Detect potential duplicate issues |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: wow-actions/potential-duplicates@v1 |
| 17 | + with: |
| 18 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 19 | + # Issue title filter work with anymatch https://www.npmjs.com/package/anymatch. |
| 20 | + # Any matched issue will stop detection immediately. |
| 21 | + # You can specify multi filters in each line. |
| 22 | + filter: '' |
| 23 | + # Exclude keywords in title before detecting. |
| 24 | + exclude: '' |
| 25 | + # Label to set, when potential duplicates are detected. |
| 26 | + label: 'potential duplicate' |
| 27 | + # Get issues with state to compare. Supported state: 'all', 'closed', 'open'. |
| 28 | + state: all |
| 29 | + # If similarity is higher than this threshold([0,1]), issue will be marked as duplicate. |
| 30 | + # Turn this up if the detection is too sensitive |
| 31 | + threshold: 0.6 |
| 32 | + # Reactions to be add to comment when potential duplicates are detected. |
| 33 | + # Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes" |
| 34 | + # reactions: '-1' |
| 35 | + # Comment to post when potential duplicates are detected. |
| 36 | + comment: > |
| 37 | + Potential duplicates: {{#issues}} |
| 38 | + - [#{{ number }}] {{ title }} ({{ accuracy }}%) |
| 39 | + {{/issues}} |
| 40 | + # When an issue is opened, detect if it has an empty body or incomplete issue form. |
| 41 | + # If it does, close the issue immediately. |
| 42 | + empty-issues: |
| 43 | + name: Close empty issues |
| 44 | + runs-on: ubuntu-latest |
| 45 | + steps: |
| 46 | + - name: Run empty issues closer action |
| 47 | + uses: rickstaa/empty-issues-closer-action@v1 |
| 48 | + env: |
| 49 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 50 | + with: |
| 51 | + close_comment: Closing this issue because it appears to be empty. Please update the issue for it to be reopened. |
| 52 | + open_comment: Reopening this issue because the author provided more information. |
0 commit comments