Skip to content

Close Stale Issues

Close Stale Issues #68

Workflow file for this run

name: Close Stale Issues
on:
schedule:
# Run daily at midnight UTC
- cron: "0 0 * * *"
workflow_dispatch: # Allow manual trigger
permissions:
issues: write
contents: read
jobs:
close-stale:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
working-directory: scripts
run: npm install
- name: Build TypeScript
working-directory: scripts
run: npm run build
- name: Close stale issues
working-directory: scripts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY_OWNER: ${{ github.repository_owner }}
REPOSITORY_NAME: ${{ github.event.repository.name }}
run: node dist/close_stale.js
- name: Create workflow summary
if: always()
run: |
echo "## Stale Issue Closer Summary" >> $GITHUB_STEP_SUMMARY
echo "Status: ${{ job.status }}" >> $GITHUB_STEP_SUMMARY
echo "Run time: $(date)" >> $GITHUB_STEP_SUMMARY