Require PR descriptions (#4233)

* Require PR descriptions

Add a simple workflow check to ensure PRs have a description.

* Potential fix for code scanning alert no. 32: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
master
Signal Linden 2025-06-10 09:21:49 -07:00 committed by GitHub
parent 4c529c85d1
commit 3c7dde56e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 21 additions and 0 deletions

21
.github/workflows/check-pr.yaml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Check PR
on:
pull_request:
types: [opened, edited, reopened, synchronize]
permissions:
contents: read
jobs:
check-description:
runs-on: ubuntu-latest
steps:
- name: Check PR description
uses: actions/github-script@v7
with:
script: |
const description = context.payload.pull_request.body || '';
if (description.trim().length < 20) {
core.setFailed("❌ PR description is too short. Please provide at least 20 characters.");
}