diff --git a/.github/workflows/pr_description.yml b/.github/workflows/pr_description.yml new file mode 100644 index 00000000000..56947fe166f --- /dev/null +++ b/.github/workflows/pr_description.yml @@ -0,0 +1,23 @@ +name: PR Description Check + +on: + pull_request: + types: [opened, edited, reopened, synchronize, ready_for_review] + +permissions: + contents: read + pull-requests: read + +jobs: + pr-description: + name: Ensure PR description is present + runs-on: ubuntu-latest + steps: + - name: Check PR description + shell: bash + run: | + body="${{ github.event.pull_request.body }}" + if [ -z "$(echo "$body" | tr -d '[:space:]')" ]; then + echo "::error::PR description is empty. Please provide a description of the change." + exit 1 + fi