Actions: attempt to validate PR description tests #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |