This GitHub Action helps maintainers of open source projects go on vacation and take mental health breaks by limiting community interactions within a repository. During this time, commenting, opening issues, or creating pull requests will be limited to a defined group.
This GitHub Action avoids the 24 hour limit of the GitHub repository interactions limit feature. This makes it easier for the project maintainers to take longer breaks and does so in a more transparent way for the community.
Inspired by @mrdoob's, maintainer of three.js, feature request https://twitter.com/mrdoob/status/1305989856368234496 .
To see an example of what "vacation mode" looks like when activated, check out https://github.com/lucasrangit/vacation-mode-test/issues. Try to comment, open an issue, or create a pull request to see what it looks like when interactions are restricted.
Dear community, as the maintainer of this project, I have put the repository in "vacation mode" so that I can take a much needed and deserved break without worrying about tasks piling up while I recharge. I hope you can understand the need to take this action and not just "turn off notifications". Anyone who has experienced a company-wide shutdown would understand, that it's much easier to disconnect from work when everyone does at the same time.
Know that your contributions are valuable and appreciated, so please subscribe to this issue and get notified when I'm back and ready to resume actively maintaining this project.
limit-group
Required Must be one of: existing_users
, contributors_only
, or collaborators_only
. Default "collaborators_only"
.
Groups are defined as follows:
vacation-mode-activated
Required The comment when vacation mode is activated. It must include vacation-mode-activated
in the Markdown. The default is ![vacation-mode-activated](https://i.imgflip.com/18t5ch.jpg)
of this happy puppy.
personal-access-token
Required A personal access token is required because the GitHub API token generated for GitHub Actions does not include the repo
scope necessary to control the repository interaction limits.
vacation-mode
(name is not important) with the repo
scope.PERSONAL_ACCESS_TOKEN
and copied token value.For more information see the following documents
Add the following to .github/workflows/vacation-mode.yml
.
name: Vacation Mode
on:
# Run on all issue activity
issues:
# Run daily to reset the 24 hour interaction limit timer as needed
schedule:
- cron: "0 0 * * *"
jobs:
vacation_mode_job:
runs-on: ubuntu-latest
name: Update Vacation Mode
steps:
- uses: robotnyc/vacation-mode-action@v2
with:
limit-group: 'collaborators_only'
vacation-mode-activated: '![vacation-mode-activated](https://i.imgflip.com/18t5ch.jpg)'
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}