Skip to content

Commit f4b77b6

Browse files
committed
Check for adding description
1 parent 5aed1a9 commit f4b77b6

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

.github/workflows/pr-description-check.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,13 @@ jobs:
2525
const description = pr.data.body || '';
2626
const defaultText = "Please include a summary of the fix/feature/change, including any relevant motivation and context.";
2727
28-
// Check if description is empty, only whitespace, or contains default text
29-
if (!description ||
30-
description.trim().length === 0 ||
31-
description.includes(defaultText) ||
32-
description === 'null' ||
33-
description === 'undefined') {
34-
const errorMessage = `📝 PR Description Error:
28+
// Only check for default template text
29+
if (description.includes(defaultText)) {
30+
const errorMessage = ` PR Description Error:
3531
Your PR description needs attention.
3632
3733
Description Requirements:
38-
- Must not be empty
39-
- Must not contain only the default template text
34+
- Must not contain the default template text
4035
- Should include:
4136
* A clear summary of the changes
4237
* Motivation for the changes
@@ -52,7 +47,7 @@ jobs:
5247
body: errorMessage
5348
});
5449
55-
core.setFailed('PR description validation failed. Please check the comment for details.');
50+
core.setFailed('🚨 PR description validation failed. Please check the comment for details.');
5651
}
5752
5853
// Log the description for debugging

0 commit comments

Comments
 (0)