Skip to content

A GitHub Action that closes milestones that are 100% done 🚮

License

Notifications You must be signed in to change notification settings

instantish/milestone-closer

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

Close milestones that are done

Automatically closes milestones that have more than one issue/pr and all issues/prs are marked closed.

Usage

Basic (runs every 20 minutes):

name: "Close finished milestones"
on:
  schedule:
  - cron: "*/20 * * * *"

jobs:
  milestone-closer:
    runs-on: ubuntu-latest
    steps:
    - uses: instantish/milestone-closer@v1

Runs on issue and PR updates:

name: "Close finished milestones"
on:
  issues:
    types: [opened, deleted, closed, reopened, milestoned, demilestoned]
  pull_request:
    types: [opened, closed, reopened]

jobs:
  milestone-closer:
    runs-on: ubuntu-latest
    steps:
    - uses: instantish/milestone-closer@v1

Uses a different minimum number of issues:

name: "Close finished milestones"
on:
  schedule:
  - cron: "*/20 * * * *"

jobs:
  milestone-closer:
    runs-on: ubuntu-latest
    steps:
    - uses: instantish/milestone-closer@v1
      with:
        min-issues: 3

See action.yml for the full list of options.

Debugging

To see debug ouput from this action, you must set the secret ACTIONS_STEP_DEBUG to true in your repository. You can run this action in debug only mode (no actions will be taken on your milestones) by passing debug-only true as an argument to the action.

Building and testing

Install the dependencies

$ npm install

Build the package

$ npm run build

Run the tests ✔️

$ npm test

More Resources

For more resources or tools to make issue tracking easier, check out Instantish ⚡️

If you have questions about setting this up, feel free to reach out to hi@itsinstantish.com with subject line "Question about GitHub Action" 😊