File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ name : PR Description Validator
2+
3+ on :
4+ pull_request :
5+ types : [opened, edited, reopened]
6+
7+ jobs :
8+ validate-pr-description :
9+ name : Validate PR Description
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Set up workspace
13+ uses : actions/checkout@v2
14+
15+ - name : Validate PR Description
16+ run : |
17+ # Ensure jq is installed
18+ sudo apt-get install jq
19+
20+ # Fetch PR description using jq
21+ PR_DESCRIPTION=$(jq -r ".pull_request.body" "$GITHUB_EVENT_PATH")
22+ KEYWORD="REQUIRED_KEYWORD"
23+
24+ # Check for the required keyword in the PR description
25+ if [[ $PR_DESCRIPTION = *"<!--"* ]] || [[ $PR_DESCRIPTION = *"-->"* ]]; then
26+ echo "Please remove the welcome comment from your PR description."
27+ exit 1
28+ fi
You can’t perform that action at this time.
0 commit comments