Issue with Foreign Keys in SQL Table Creation #288
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
}); | |
} |