Skip to content

[Question] CoreSqlOrder写入报错 #241

[Question] CoreSqlOrder写入报错

[Question] CoreSqlOrder写入报错 #241

Workflow file for this run

name: "Check Issue"
on:
issues:
types:
- opened
- edited
jobs:
closeInvalidFormatIssue:
runs-on: ubuntu-latest
steps:
- name: Check issue format
uses: actions/github-script@v4
with:
script: |
const issueTitle = context.payload.issue.title;
const regex = /^\[(Question|Feature)\]\s.+/;
if (!regex.test(issueTitle)) {
await github.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `Please provide titles that are straightforward and concise. exp: [Question] How to use or [Feature] Add new feature
请提供简单明了的标题。例如 [Question] 如何使用 or [Feature] 添加新功能`,
labels: ['invalid-format'],
state: "closed"
});
}