diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index cd2c6e0b..1c4bf125 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -38,7 +38,7 @@ body: - Issue is not related to your app that has multiple dependencies - Can isolate the problem - Allow us to reproduce in minutes - placeholder: https://github.com + placeholder: https://github.com (without reproduction the issue will be automatically closed) validations: required: true diff --git a/.github/workflows/validate-issue.yaml b/.github/workflows/validate-issue.yaml new file mode 100644 index 00000000..576e635c --- /dev/null +++ b/.github/workflows/validate-issue.yaml @@ -0,0 +1,23 @@ +name: Validate issue + +on: + issues: + types: + - opened + +env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NUMBER: ${{ github.event.issue.number }} + REPO: "uni-stack/uniwind" + +jobs: + autoclose: + if: ${{ !contains(github.event.issue.body, 'github.com') }} + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Close Issue + run: gh issue close "$NUMBER" --comment "This issue has been automatically closed because it **lacks a clear, minimal reproduction** that we can use to verify the reported bug." --repo "$REPO" + - name: Label Issue + run: gh issue edit "$NUMBER" --add-label "invalid" --repo "$REPO"