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
parent
4c529c85d1
commit
3c7dde56e5
|
|
@ -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.");
|
||||
}
|
||||
Loading…
Reference in New Issue