Code Monkey home page Code Monkey logo

issue-triage-action's Introduction

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 or closed
  • select label to be set for stale issues

Inputs

  • ghToken Required, GitHub token

  • staleAfter 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 than staleAfter), default: 0

  • staleLabel string, a label to be set to the stale issue, default: STALE

  • staleComment string, a comment placed when marking issue as stale. See a guide on how to style this message.

  • closeComment string, a comment placed when closing 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: '0 23 14 * *' # At 23:00, 14th day of each month
jobs:
  triage_issues:
    name: Issue triage
    runs-on: ubuntu-latest
    steps:
    - name: Find old issues and mark them stale
      uses: Krizzu/[email protected]
      with:
        ghToken: ${{ secrets.GITHUB_TOKEN }}
        staleAfter: 30
        closeAfter: 60
        staleLabel: "STALE ๐Ÿ“บ"
        staleComment: "This issue is %DAYS_OLD% days old, marking as stale! cc: @%AUTHOR%"
        closeComment: "Issue last updated %DAYS_OLD% days ago! Closing down!"
        showLogs: true

Template comment

The comment is a template string with placeholders to use:

  • %AUTHOR% - Issue creator
  • %DAYS_OLD% - How long (in days) the issue was last updated

Example:

with:
  closeComment: "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.

issue-triage-action's People

Contributors

krizzu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

issue-triage-action's Issues

Issues not being closed

Everytime that the action posts a new message for marking the issue as stale, resets the counter for closing the issue. The counter for closing should ignore comments generated by the action.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.