Vacation Mode Action Save

Limit interactions to your repository while on vacation using GitHub Actions

Project README

Vacation Mode JavaScript Action

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 .

Demo

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.

Usage

  1. Add the setup code to your repository workflow.
  2. Create an issue with a title that contains "vacation". For example, "🌴 On Vacation Next Week".
  3. Pin the issue to activate the action and so your community can clearly see that you are on vacation.
  4. Include an "out-of-office note" in the issue description explaining to your community why their interactions will be limited. See below for an example.
  5. Close the issue when you are back from vacation to deactivate vacation mode.
    • Note: If your vacation is longer than 60 days and your repository is inactive, GitHub will disable the action requiring you to manually re-enable it.
  6. Unpin the issue to deactivate the action.

Sample Text

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.

Inputs

limit-group

Required Must be one of: existing_users, contributors_only, or collaborators_only. Default "collaborators_only".

Groups are defined as follows:

  • Limit to existing users: Limits activity for users with accounts that are less than 24 hours old who do not have prior contributions and are not collaborators.
  • Limit to prior contributors: Limits activity for users who have not previously contributed and are not collaborators.
  • Limit to repository collaborators: Limits activity for users who do not have write access or are not collaborators.

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.

vacation-mode-activated

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.

  1. Go to https://github.com/settings/tokens and create a personal access token named vacation-mode (name is not important) with the repo scope.
  2. Copy the token value.
  3. Go to the repository secrets settings https://github.com/{org}/{repo}/settings/secrets.
  4. Add a secret with the name PERSONAL_ACCESS_TOKEN and copied token value.

For more information see the following documents

Setup

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 }}
Open Source Agenda is not affiliated with "Vacation Mode Action" Project. README Source: robotnyc/vacation-mode-action
Stars
73
Open Issues
4
Last Commit
1 year ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating