diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index fbcea17b5..6320a4740 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,15 +7,17 @@ assignees: '' --- + + +Device: +Android version: +Magisk version name: +Magisk version code: diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml new file mode 100644 index 000000000..c4d26fc3d --- /dev/null +++ b/.github/workflows/issues.yml @@ -0,0 +1,26 @@ +name: Check Issues + +on: + issues: + types: [opened] +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v2 + - name: Read latest version code + run: | + ver=$(sed -n 's/^magisk.versionCode=//p' gradle.properties) + echo MAGISK_VERSION_CODE=$ver >> $GITHUB_ENV + - if: contains(github.event.issue.body, format('Magisk version code{0} ', ':')) != true + id: close + name: Close Issue(template) + uses: peter-evans/close-issue@v1 + with: + comment: This issue is being automatically closed because it does not follow the issue template. + - if: steps.close.conclusion == 'skipped' && contains(github.event.issue.body, format('Magisk version code{0} {1}', ':', env.MAGISK_VERSION_CODE)) != true + name: Close Issue(latest canary) + uses: peter-evans/close-issue@v1 + with: + comment: This issue is being automatically closed because latest canary Magisk version code is ${{ env.MAGISK_VERSION_CODE }}.