+
Skip to content

osy/github-cooldown-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Cooldown Action

Limit the amount of new issues or issue comments created by new users. Once the number of issues/comments exceeds a threshold in a short amount of time, all issues/comments made over that threshold will be deleted automatically. This helps reduce the impact of griefers and trolls.

Inputs

token

Required A Github Personal Token with repo access. Used to perform delete actions.

repository

The name of the repository to protect in the format username/repository. If left blank, the current repository will be used.

cooldownMinutes

The minimum amount of time (in minutes) that a user is allowed to make a new issue or comment on an issue. Issues and comments are counted separately. The default cooldown is 10 minutes.

exemptAgeDays

Accounts older than this (in days) will be exempt from cooldown rules. If 0, then no accounts are exempt. The default is 0 (no exemption).

maxNewIssues

Number of issues permitted before triggering a cooldown. Default is 1. The count is separate from number of comments.

maxNewComments

Number of comments permitted before triggering a cooldown. Default is 1. The count is separate from number of issues.

Example usage

name: Issues
on:
  issue_comment:
    types: [created]
  issues:
    types: [opened]
jobs:
  cooldown:
    name: Cooldown
    runs-on: ubuntu-latest
    continue-on-error: true
    steps:
    - name: Cooldown
      uses: osy/github-cooldown-action@v1
      with:
        token: ${{ secrets.COOLDOWN_TOKEN }}
        exemptAgeDays: 365

About

Github Action to limit number of issues/comments by new users

Resources

License

Stars

Watchers

Forks

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载