mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-23 16:15:10 +00:00
ci: remove PR description validation check
Drop the validate-description job from the PR workflow; the has-milestone check remains.
This commit is contained in:
@@ -15,49 +15,6 @@ on:
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
validate-description:
|
||||
name: Validate Description
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/github-script@v9
|
||||
with:
|
||||
script: |
|
||||
if (context.eventName === 'merge_group') {
|
||||
// Ignore merge_group events
|
||||
return;
|
||||
}
|
||||
|
||||
const body = context.payload.pull_request.body || '';
|
||||
|
||||
const errors = [];
|
||||
|
||||
// Check for ## Description section
|
||||
const descMatch = body.match(/^## Description:\s*\n([\s\S]*?)(?:^## |\Z)/m);
|
||||
if (!descMatch || descMatch[1].trim().length < 20) {
|
||||
errors.push('❌ Missing or short `## Description:` section.');
|
||||
}
|
||||
|
||||
// Check all five boxes are checked
|
||||
const requiredBoxes = [
|
||||
/- \[x\] I have added screenshots for all UI updates/i,
|
||||
/- \[x\] I process any text displayed to the user through translateText\(\) and I\'ve added it to the en\.json file/i,
|
||||
/- \[x\] I have added relevant tests to the test directory/i,
|
||||
];
|
||||
|
||||
for (const box of requiredBoxes) {
|
||||
if (!box.test(body)) {
|
||||
errors.push('❌ One or more checklist items are not checked.');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (errors.length > 0) {
|
||||
core.setFailed(errors.join('\n'));
|
||||
} else {
|
||||
console.log('✅ PR description and checklist look good.');
|
||||
}
|
||||
|
||||
has-milestone:
|
||||
name: Has Milestone
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user