From 3c7dde56e55bc36b3befe9fbf23fd1d50fdd68e2 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Tue, 10 Jun 2025 09:21:49 -0700 Subject: 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> --- .github/workflows/check-pr.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/check-pr.yaml diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml new file mode 100644 index 0000000000..a5cee9157c --- /dev/null +++ b/.github/workflows/check-pr.yaml @@ -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."); + } -- cgit v1.2.3