Skip to content

Auto Close Outdated Issues #22

Auto Close Outdated Issues

Auto Close Outdated Issues #22

Workflow file for this run

name: Auto Close Outdated Issues
on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
# inputs:
# name:
# description: 'Person to greet'
# required: true
# default: 'Mona the Octocat'
# home:
# description: 'location'
# required: false
# default: 'The Octoverse'
jobs:
auto-close:
runs-on: ubuntu-latest
steps:
- name: Set long time ago date as env variable
run: echo "::set-env name=LONG_TIME::$(date -d "365 days ago" +"%Y-%m-%d")"
- name: Set query as env variable
run: echo "::set-env name=QUERY::created:<$LONG_TIME state:open"
- uses: lee-dohm/close-matching-issues@v2
with:
query: ${{ env.QUERY }}
token: ${{ secrets.GITHUB_TOKEN }}