Add PR checklist validation to pr-description-check action - #52
Merged
Merged
Conversation
Signed-off-by: Peixin Li <pxLi@nyu.edu>
Greptile SummaryThis PR extends the Key changes and observations:
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A([PR event triggered]) --> B[Fetch PR body and SHA]
B --> C{PR body contains HTML comment?}
C -- Yes --> D[errors: has HTML comments]
C -- No --> E[Continue]
D --> E
E --> F[Fetch PR template via getContent API]
F --> G{HTTP 404?}
G -- Yes --> H[Skip checklist check]
G -- No --> I{type is not file or content is null?}
I -- Yes --> J[Skip checklist check]
I -- No --> K[Decode base64 to templateContent]
K --> L[Extract unchecked items from template]
L --> M{templateItems length > 0?}
M -- No --> N[Skip checklist check]
M -- Yes --> O[Extract all items from PR body into Set]
O --> P[Filter template items not in body Set]
P --> Q{Missing items found?}
Q -- Yes --> R[errors: missing checklist items]
Q -- No --> S[Continue]
R --> S
H --> T{Any errors?}
J --> T
N --> T
S --> T
T -- Yes --> U[core.setFailed with detailed message]
T -- No --> V[statusDesc = PR description is valid]
U --> W[createCommitStatus state=failure]
V --> X[createCommitStatus state=success]
Reviews (2): Last reviewed commit: "address comments" | Re-trigger Greptile |
YanxuanLiu
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix NVIDIA/cudf-spark#14457
Summary
Some checklist items may be unexpectedly removed from PR descriptions. This change extends the
pr-description-checkaction to verify that all required checklist items from the repo's PR template are still present in the PR body.How it works
.github/PULL_REQUEST_TEMPLATE.mdfrom the caller repo via GitHub API at runtime- [ ]checklist items from the template- [ ],- [x], or- [X])Key design decisions
PR Descriptionstatus contextrate limit, 500)
template-pathinput (defaults to.github/PULL_REQUEST_TEMPLATE.md)Verified in forked repos
Has HTML comments, missing checklist items.

Has HTML comments only,

Missing checklist items only,

Passed,

No template,
