Skip to content

im-open/pr-tasks-completed-action

Repository files navigation

PR Task Complete Action

Verify's all tasks are complete on a pull request's description body.

Pattern

Within the PR's description body, identifies tasks by:

^ *- +\\[(?<checked> +|[xX])\\](?<name>.+)$

If a different pattern is desired, pass a pattern value. Make sure to include the named groups:

  1. name: name of the task
  2. checked

Index

Inputs

Parameter Is Required Default Description
pattern false See above Expression to identify tasks on within a multiline context
body false Current context If not passed, will default to the current PR context's body

Outputs

Output Description
result true if all tasks are completed or no tasks found. false for any incomplete tasks.
completed-count Number of completed tasks
incomplete-count Number of incomplete tasks
tasks Serlized array of tasks [{ checked: boolean, name: string }]

Usage Examples

name: 🛠️ PR Tasks Completed Check
on:
  pull_request:
    types: [edited, opened, synchronize, reopened]
    
concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

jobs:
  task-check:
    runs-on: ubuntu-latest
    steps:
      - name: Get work items from PR or Release
        uses: im-open/pr-tasks-completed-action@v2

See workflow automated test for more examples

Reusable Workflows

TBD. Reusable workflows that:

  1. References this action in transitioning a Jira ticket during a successful deployment.
  2. Verifies a Jira ticket exists and has the correct properties

Contributing

When creating new PRs please ensure:

  1. The action has been recompiled. See the Recompiling section below for more details.
  2. For major or minor changes, at least one of the commit messages contains the appropriate +semver: keywords listed under Incrementing the Version.
  3. The README.md example has been updated with the new version. See Incrementing the Version.
  4. The action code does not contain sensitive information.

Recompiling

If changes are made to the action's code in this repository, or its dependencies, you will need to re-compile the action.

# Installs dependencies and bundles the code
npm start

# Bundle the code (if dependencies are already installed)
npm run build

These commands utilize esbuild to bundle the action and its dependencies into a single file located in the dist folder.

Incrementing the Version

This action uses git-version-lite to examine commit messages to determine whether to perform a major, minor or patch increment on merge. The following table provides the fragment that should be included in a commit message to active different increment strategies.

Increment Type Commit Message Fragment
major +semver:breaking
major +semver:major
minor +semver:feature
minor +semver:minor
patch default increment type, no comment needed

Code of Conduct

This project has adopted the im-open's Code of Conduct.

License

Copyright © 2022, Extend Health, LLC. Code released under the MIT license.

About

Adds status check if all tasks in PR description are complete

Topics

Resources

License

Code of conduct

Contributing

Stars

0 stars

Watchers

2 watching

Forks

Packages

 
 
 

Contributors