Skip to content

Github action PR Issue checker #1

Github action PR Issue checker

Github action PR Issue checker #1

Workflow file for this run

name: PR Description Check
on:
pull_request:
types: [opened]
jobs:
validate-pr-description:
steps:

Check failure on line 9 in .github/workflows/prIssueChecker.yml

View workflow run for this annotation

GitHub Actions / PR Description Check

Invalid workflow file

The workflow is not valid. .github/workflows/prIssueChecker.yml (Line: 9, Col: 5): Required property is missing: runs-on
- name: Check if PR description exists
id: check_description
run: |
if [ -z "${{ github.event.pull_request.body }}" ]; then
echo "::error::Description is missing!"
exit 1
fi
- name: Check for issue number or 'Fixes #NEW'
id: check_issue_number
run: |
description="${{ github.event.pull_request.body }}"
if [[ ! "$description" =~ (Fixes #[0-9]+|Fixes #NEW) ]]; then
echo "::error::PR description must contain an issue number or 'Fixes #NEW'"
exit 1
fi