Skip to content
refresh-ccw

GitHub Action

TODO Issue Reopener

v1.2.1 Latest version

TODO Issue Reopener

refresh-ccw

TODO Issue Reopener

Reopen issues that are referenced by TODOs

Installation

Copy and paste the following snippet into your .yml file.

              

- name: TODO Issue Reopener

uses: ianlewis/[email protected]

Learn more about this action in ianlewis/todo-issue-reopener

Choose a version

todo-issue-reopener

tests codecov OpenSSF Scorecard SLSA 3

The ianlewis/todo-issue-reopener GitHub Action uses the todos tool to search your checked out code for TODO comments that reference issues and reopens issues that have been closed prematurely. todo-issue-reopener will also add a comment on the issue with a link to the source code where the TODO can be found.

reopened issue comment

TODO comments can take the following forms:

// TODO(#123): Referencing the issue number with a pound sign.
// TODO(123): Referencing the issue number only.
// TODO(github.com/owner/repo/issues/123): Referencing the issue url without scheme.
// TODO(https://github.com/owner/repo/issues/123): Referencing the issue url with scheme.

See the todos documentation for more info on supported formats for TODO comments.

Getting Started

First use the actions/checkout action to check out your repository. After that you can call ianlewis/todo-issue-reopener to scan your codebase for TODO comments.

Note that you must set the issues: write permission on the job if using the default GITHUB_TOKEN. Also note that the directory scanned must be in a git checkout.

on:
  workflow_dispatch:
  schedule:
    - cron: "0 0 * * *"

permissions: {}

jobs:
  issue-reopener:
    runs-on: ubuntu-latest
    permissions:
      issues: write
    steps:
      - uses: actions/checkout@v3
      - name: Issue Reopener
        uses: ianlewis/[email protected]

Inputs

Name Required Default Description
path No github.workspace The root path of the source code to search.
token No github.token The GitHub token to use. This token must have issues: write permissions.
dry-run No false If true, issues are only output to logs and not actually reopened.
config-path No .github/issue-reopener.yml Path to an optional config file.

Outputs

There are currently no outputs.

Configuration

An optional configuration file in YAML format can added to your repository. The path can be specified by the config-path input. It defaults to .github/issue-reopener.yml.

vanityURLs

Some projects use a custom vanity URL for issues. vanityURLs is a list of RegExp values used to match URLs and extract a GitHub issue number. The issue number must be extracted with a named capturing group named "id".

Example:

vanityURLs:
  - "^\\s*(https?://)?golang.org/issues/(?<id>[0-9]+)\\s*$"