Validate task list completion in PR descriptions
The Task List Validator ensures that task lists (checkboxes) in pull request descriptions are completed. This is useful for enforcing pre-merge checklists, ensuring contributors follow important steps before their PRs are merged.
Must be set to "taskList"
Section heading patterns to validate (checks task lists in these sections)
Custom message to display when validation fails
Ensure all tasks in the “Checklist” section are completed:
Check tasks in multiple sections:
Use patterns to match section headings:
Parse Description
The validator parses the PR description to identify markdown sections and task lists
Identify Sections
It identifies sections that match the patterns specified in include
Check Task Lists
For each matching section, it verifies all task list items are checked
Return Result
Returns a validation result with status (pass, fail, or error) and a message
The validator looks for Markdown task lists in the format:
To make the most of this validator, create a PR template with task lists:
Save this template as .github/PULL_REQUEST_TEMPLATE.md
in your repository.
Ensure contributors confirm important checks before merging:
Apply different checklists based on the type of PR:
Enforce a security checklist for certain types of changes:
You can create specialized PR templates for different scenarios by using directories:
.github/PULL_REQUEST_TEMPLATE/
feature.md
- Template for feature PRsbugfix.md
- Template for bug fixessecurity.md
- Template for security-related changesContributors can then use the template that fits their PR:
Don’t make checklists too long or contributors might check items without properly considering them
Provide helpful guidance when tasks are incomplete:
Validate task list completion in PR descriptions
The Task List Validator ensures that task lists (checkboxes) in pull request descriptions are completed. This is useful for enforcing pre-merge checklists, ensuring contributors follow important steps before their PRs are merged.
Must be set to "taskList"
Section heading patterns to validate (checks task lists in these sections)
Custom message to display when validation fails
Ensure all tasks in the “Checklist” section are completed:
Check tasks in multiple sections:
Use patterns to match section headings:
Parse Description
The validator parses the PR description to identify markdown sections and task lists
Identify Sections
It identifies sections that match the patterns specified in include
Check Task Lists
For each matching section, it verifies all task list items are checked
Return Result
Returns a validation result with status (pass, fail, or error) and a message
The validator looks for Markdown task lists in the format:
To make the most of this validator, create a PR template with task lists:
Save this template as .github/PULL_REQUEST_TEMPLATE.md
in your repository.
Ensure contributors confirm important checks before merging:
Apply different checklists based on the type of PR:
Enforce a security checklist for certain types of changes:
You can create specialized PR templates for different scenarios by using directories:
.github/PULL_REQUEST_TEMPLATE/
feature.md
- Template for feature PRsbugfix.md
- Template for bug fixessecurity.md
- Template for security-related changesContributors can then use the template that fits their PR:
Don’t make checklists too long or contributors might check items without properly considering them
Provide helpful guidance when tasks are incomplete: