Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷add issue checker workflow #2594

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/issue-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Issue Checker

on:
issues:
types: [opened, edited]

jobs:
check-permission:
runs-on: ubuntu-latest
outputs:
require-result: ${{ steps.checkUser.outputs.require-result }}
steps:
- uses: actions-cool/check-user-permission@v2
id: checkUser
with:
require: 'write'

check-open:
runs-on: ubuntu-latest
needs: check-permission
if: needs.check-permission.outputs.require-result == 'false' && github.event.issue.state == 'open' && contains(github.event.issue.title, '[Feature Request]') == false && contains(github.event.issue.body, 'https://github.com') == false && contains(github.event.issue.body, 'https://stackblitz.com') == false && contains(github.event.issue.body, 'https://codesandbox.io') == false
steps:
- uses: actions-cool/maintain-one-comment@v3
with:
body: 由于缺乏足够的信息(github、stackblitz、codesandbox等可复现仓库),我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供[最小重现](https://stackoverflow.com/help/minimal-reproducible-example)以重新开启。谢谢。
- uses: actions-cool/issues-helper@v3
with:
actions: close-issue

check-close:
runs-on: ubuntu-latest
needs: check-permission
if: needs.check-permission.outputs.require-result == 'false' && github.event.issue.state == 'closed' && (contains(github.event.issue.body, 'https://github.com') == true || contains(github.event.issue.body, 'https://stackblitz.com') == true || contains(github.event.issue.body, 'https://codesandbox.io') == true)
steps:
- uses: actions-cool/issues-helper@v3
with:
actions: open-issue