Skip to content

Actions: attempt to validate PR description tests #5

Actions: attempt to validate PR description tests

Actions: attempt to validate PR description tests #5

Workflow file for this run

name: PR Description
on:
pull_request:
types: [opened, edited, reopened]
jobs:
validate-pr-description:
name: Validate Description
runs-on: ubuntu-latest
steps:
- name: Set up workspace
uses: actions/checkout@v2
- name: Validate
run: |
# Ensure jq is installed
# sudo apt-get install jq
# Fetch PR description using jq
PR_DESCRIPTION=$(jq -r ".pull_request.body" "$GITHUB_EVENT_PATH")
KEYWORD="REQUIRED_KEYWORD"
# Users should remove the welcome comment
if [[ $PR_DESCRIPTION = *"<!--"* ]] || [[ $PR_DESCRIPTION = *"-->"* ]]; then
echo "FAILED: Please remove the welcome comment from your PR description."
exit 1
fi