Skip to content

ci: add workflow to validate PR description sections#1947

Open
bearomorphism wants to merge 1 commit intomasterfrom
ci/validate-pr-description
Open

ci: add workflow to validate PR description sections#1947
bearomorphism wants to merge 1 commit intomasterfrom
ci/validate-pr-description

Conversation

@bearomorphism
Copy link
Copy Markdown
Collaborator

@bearomorphism bearomorphism commented May 7, 2026

Description

Add a GitHub Actions workflow that validates PR descriptions contain the required sections from the PR template.

Required sections:

  • Description
  • Checklist
  • Expected Behavior
  • Steps to Test This Pull Request

Additional Context is intentionally optional.

Checklist

Was generative AI tooling used to co-author this PR?

  • Yes (please specify the tool below)

Generated-by: GitHub Copilot following the guidelines

Code Changes

  • Add test cases to all the changes you introduce
  • Run uv run poe all locally to ensure this change passes linter check and tests
  • Manually test the changes:
    • Verify the feature/bug fix works as expected in real-world scenarios
    • Test edge cases and error conditions
    • Ensure backward compatibility is maintained
    • Document any manual testing steps performed
  • Update the documentation for the changes

Documentation Changes

N/A - CI workflow only.

Expected Behavior

PRs missing required description sections (Description, Checklist, Expected Behavior, Steps to Test) will fail the check with a clear message listing the missing sections.

Draft PRs and bot PRs (dependabot, renovate) are skipped.

Steps to Test This Pull Request

  1. Open a PR with a properly filled template - check should pass
  2. Open a PR with missing sections - check should fail listing the missing ones
  3. Open a draft PR - check should be skipped

Additional Context

Validation results

  • Positive test: PR with all sections → validate-pr passed
  • Negative test: PR body stripped to plain text → validate-pr failed ❌ with: PR description is missing required sections: Description, Checklist, Expected Behavior, Steps to Test This Pull Request

Checks that PR descriptions include the required sections from the
template: Description, Checklist, Expected Behavior, and Steps to Test.

- Triggers on opened, edited, reopened, and ready_for_review
- Skips draft PRs and bot accounts (dependabot, renovate)
- Uses line-anchored regex to match section headers
- Additional Context section is intentionally optional

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.23%. Comparing base (efb1a7d) to head (89c7e92).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1947   +/-   ##
=======================================
  Coverage   98.23%   98.23%           
=======================================
  Files          61       61           
  Lines        2772     2772           
=======================================
  Hits         2723     2723           
  Misses         49       49           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with it but a bit not sure whehter rwe really need to enforce it this strict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants