Skip to content

A simple github action to move stale issues `from-milestone` to `target-milestone`

License

Notifications You must be signed in to change notification settings

Deividy/move-stale-issues

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

Move Stale Issues

sheriff

NPM

This actions moves stales issues from-milestone to target-milestone.

This project is inspired by the https://github.com/actions/stale, but, since the stale action close issues and PRs, I decided to make a simpler action that only moves the stale issues.


Config

config description default
repo-token The github token. ${{ secrets.GITHUB_TOKEN }}) *required
from-milestone The milestone name that we will look for stale issues
you can pass milestone separated by comma (Milestone1, Milestone2...)
*required
target-milestone The milestone we will move the stale issues *required
days-before-stale Total of days we consider an issue stale
0 will move all issues from-milestone to target-milestone
30
exempt-all-assignees Exempt all issues with assignees from stale false

Using with Node.js

You can also use this action in your node.js app:

npm install move-stale-issues
const { runAction } = require('move-stale-issues');

(async () => {
  await runAction('repo-owner', 'repo-name', {
    token: 'PAT',
    fromMilestone: 'From name',
    targetMilestone: 'Target name',
    daysBeforeStale: 30
  });

Workflow example

name: move-stale-issues

on:
  schedule:
    - cron: '30 1 * * *'

jobs:
  move-stale-issues:
    runs-on: ubuntu-latest
    steps:
      - uses: Deividy/move-stale-issues@v3.2
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          from-milestone: WIP
          target-milestone: Backlog
          days-before-stale: 60

About

A simple github action to move stale issues `from-milestone` to `target-milestone`

Resources

License

Stars

Watchers

Forks