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.
Required A Github Personal Token with repo
access. Used to perform delete actions.
The name of the repository to protect in the format username/repository
. If left blank, the current repository will be used.
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.
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).
Number of issues permitted before triggering a cooldown. Default is 1. The count is separate from number of comments.
Number of comments permitted before triggering a cooldown. Default is 1. The count is separate from number of issues.
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