Skip to content

A GitHub action that checks if all tasks are completed in the pull requests.

License

Notifications You must be signed in to change notification settings

Iukekini/pr-tasks-validator-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Repository files navigation

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](

About

A GitHub action that checks if all tasks are completed in the pull requests.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 56.0%
  • TypeScript 44.0%