Skip to content

Latest commit

 

History

History
91 lines (61 loc) · 1.85 KB

README.md

File metadata and controls

91 lines (61 loc) · 1.85 KB

PR TaskList Required Items Validator

A GitHub action that validates required tasks in pull request descriptions, with support for optional items and sections.

Features

  • ✅ Validates required checklist items in PR descriptions
  • 🔄 Supports individual optional tasks with (optional) suffix
  • 📑 Enables optional sections using HTML comments
  • ❌ Fails PR check if required tasks are incomplete
  • 📝 Provides detailed list of pending required tasks

Installation

Add the action to your repository's workflow:

- uses: iukekini/pr-tasks-validator-action@v1.0.4
  with:
    repo-token: "${{ secrets.GITHUB_TOKEN }}"

Usage

Workflow Configuration

Create .github/workflows/pr-tasks.yml:

name: "Check Required PR Tasks"
on:
  pull_request:
    types: [edited, opened, synchronize, reopened]

jobs:
  task-check:
    runs-on: ubuntu-latest
    steps:
      - uses: iukekini/pr-tasks-validator-action@v1.0.4
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"

Task List Syntax

Add tasks to your PR description using any of these formats:

## Required Tasks

- [ ] Code review completed
- [ ] Unit tests passing
- [ ] This task is optional (optional)

## Nice to Have

<!--begin optional tasks-->

- [ ] Performance tests
- [ ] Documentation updates"
<!--end optional tasks-->

- [ ] Non required Tasks (optional)

## More Tasks

- [ ] Integration tests passing

The action will:

  • Fail if required tasks are unchecked
  • Skip tasks marked with (optional)
  • Ignore all tasks between optional HTML comments

Examples

Success Case

When all required tasks are complete: All tasks completed

Failure Case

When required tasks are pending: Some tasks are pending

Task List Output

View pending tasks in the Actions tab: ![List of pending tasks](