Skip to content

About

Close low-demand issues based on age and upvote thresholds

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Low Demand Closer

Close GitHub issues that have not reached configurable upvote thresholds after a configured age.

The default policy is designed for feature requests:

  • Close issues that are at least 6 months old with 5 or fewer upvotes.
  • Close issues that are at least 12 months old with fewer than 10 upvotes.

Only open issues with the configured label are considered. Pull requests are ignored.

Usage

name: Close Low Demand Feature Requests

on:
  schedule:
    - cron: "0 0 * * 1"
  workflow_dispatch:
    inputs:
      dry-run:
        description: Log matching issues without closing them
        required: false
        default: false
        type: boolean

permissions:
  contents: read
  issues: write

jobs:
  close-low-demand-issues:
    runs-on: ubuntu-latest
    steps:
      - uses: pocket-id/low-demand-closer@v1
        with:
          label: needs more upvotes
          issue-type: Feature
          dry-run: ${{ inputs['dry-run'] || false }}

Inputs

Input Default Description
github-token ${{ github.token }} Token with issues: write permission.
label needs more upvotes Only issues with this label are considered.
issue-type Feature Only issues with this issue type are considered. Set to an empty string to disable issue type filtering.
rules See below JSON array of demand rules.
dry-run false Log matching issues without commenting or closing.
comment See action.yml Comment template posted before closing.

Default rules:

[
  { "months": 6, "upvotes": 5, "operator": "<=" },
  { "months": 12, "upvotes": 10, "operator": "<" }
]

Rules support the < and <= operators.

Development

Install dependencies with:

npm ci

Build the runtime JavaScript with:

npm run build

Run tests with:

npm test

The action is authored in TypeScript under src/, but GitHub Actions runs the compiled JavaScript in dist/. Commit dist/ whenever the TypeScript source changes.

About

Close low-demand issues based on age and upvote thresholds

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages