1.0.1 • Published 4 years ago
issue_triage_action v1.0.1
Issue triage
GitHub action that deals with stale issues in your project.
Features
- find, comment and label the issue if it exceeds the selected
staleAfter
day limit - close the issue down after the
closeAfter
day limit is reached - customize the comment posted when the issue is stale
- select label to be set for stale issues
Inputs
ghToken
Required, GitHub tokenstaleAfter
int, number of days to consider an issue to be stale, default:30
closeAfter
int, number of days after the issue should be closed (0 days means off, must be higher thanstaleAfter
), default:0
staleLabel
string, a label to be set to the stale issue, default:STALE
commentTemplate
string, a template comment to be placed when handling the issue. See a guide on how to style this message.showLogs
bool. Show logs with info like total number of issues found, stale issues, closed etc. default:true
Example usage
name: Issue cleanup
on:
schedule:
- cron: '* 12 * * *'
jobs:
triage_issues:
name: Issue triage
runs-on: ubuntu-latest
steps:
- name: Find old issues and mark them stale
uses: krizzu/issue-triage-action@v1.0.1
with:
ghToken: ${{ secrets.GITHUB_TOKEN }}
staleAfter: 30
closeAfter: 60
staleLabel: "STALE 📺"
commentTemplate: "Old issue, closing down!"
showLogs: true
Styling the "stale" comment
The comment is a template string with placeholders:
%AUTHOR%
- Issue creator%DAYS_OLD%
- How long (in days) the issue was last updated
Example:
with:
commentTemplate: "This issue is %DAYS_OLD% old, closing down! Notifying author: @%AUTHOR%"
Running locally
To test action locally, create .env
file, with content from .env.example
.
Run dev
script to run.