mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-28 05:46:36 +08:00
88360350a0
Delete the old monolithic openflare-server implementation and rename Wavelet/ to openflare-server/ to complete the migration consolidation. Update CI workflows, agent Dockerfiles, and deployment docs for the new layout (frontend/, docker/Dockerfile).
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
name: Check PR Template Checklist
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, edited, synchronize]
|
|
|
|
jobs:
|
|
check-pr-template:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: check all checklist items are checked
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
// get the pull request body
|
|
const prBody = context.payload.pull_request.body || '';
|
|
|
|
// regex to match all checklist items in the template
|
|
// matches lines like: - [ ] ... or - [x] ...
|
|
const checklistRegex = /^- \[( |x|X)\] .+$/gm;
|
|
const matches = prBody.match(checklistRegex) || [];
|
|
|
|
// check if any checklist item is not checked
|
|
const unchecked = matches.filter(line => line.startsWith('- [ ]'));
|
|
|
|
// if any unchecked, fail the workflow
|
|
if (unchecked.length > 0) {
|
|
core.setFailed(`PR checklist 未全部勾选,请确保所有 checklist 项都已勾选。未勾选项如下:\n${unchecked.join('\n')}`);
|
|
} else {
|
|
console.log('all checklist items are checked.');
|
|
}
|
|
|