1+ name : Enforce issue template
2+ on :
3+ issues :
4+ types : [opened, edited, renamed]
5+
6+ jobs :
7+ auto_close_issues :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Autoclose issues that did not follow issue template
11+ if : startsWith(github.event.issue.title, '[BUG]:')
12+ uses : roots/issue-closer@v1.2
13+ with :
14+ repo-token : ${{ secrets.GITHUB_TOKEN }}
15+ issue-close-message : " @${issue.user.login} this issue was automatically closed because it did not follow the issue template"
16+ issue-pattern : " .*### Description.*"
17+ - name : Autoclose issues that are using an old version
18+ if : startsWith(github.event.issue.title, '[BUG]:')
19+ uses : roots/issue-closer@v1.2
20+ with :
21+ repo-token : ${{ secrets.GITHUB_TOKEN }}
22+ issue-close-message : " @${issue.user.login} this issue was automatically closed because you are using an unsupported version"
23+ issue-pattern : " .*### Tvheadend Version[\\ r\\ n]+v4\\ .(3 \\ (development\\ )|4 \\ (stable\\ )).*"
24+ - name : Autoclose feature ideas which are not developed by the user
25+ if : startsWith(github.event.issue.title, '[FEATURE]:')
26+ uses : roots/issue-closer@v1.2
27+ with :
28+ repo-token : ${{ secrets.GITHUB_TOKEN }}
29+ issue-close-message : " @${issue.user.login} this issue was automatically closed because you are not willing to develop this"
30+ issue-pattern : " .*### Acceptance[\\ r\\ n]+- \\ [X\\ ] The proposal will be developed and maintained by me.*"
31+ - name : Autoclose issues not having an accepted prefix
32+ if : " !startsWith(github.event.issue.title, '[BUG]:') && !startsWith(github.event.issue.title, '[FEATURE]:')"
33+ uses : peter-evans/close-issue@v3
34+ with :
35+ comment : " @${{ github.event.issue.user.login }} this issue was automatically closed because it did not follow the issue template"
0 commit comments