Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
help-circle

GitHub Action

Support Requests

v2.1.2

Support Requests

help-circle

Support Requests

Comment on and close issues labeled as support requests

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Support Requests

uses: dessant/support-requests@v2.1.2

Learn more about this action in dessant/support-requests

Choose a version

Support Requests

Support Requests is a GitHub Action that comments on and closes issues labeled as support requests.

Supporting the Project

The continued development of Support Requests is made possible thanks to the support of awesome backers. If you'd like to join them, please consider contributing with Patreon, PayPal or Bitcoin.

Description

Support Requests is a specialized version of Label Actions, and it can perform the following actions when an issue is labeled, unlabeled or reopened:

  • The support label is added: leave a comment, close and lock the issue
  • The support label is removed: reopen and unlock the issue
  • The issue is reopened: remove the support label, unlock the issue

Usage

Create the support.yml workflow file in the .github/workflows directory, use one of the example workflows to get started.

Inputs

The action can be configured using input parameters.

  • github-token
    • GitHub access token, value must be ${{ github.token }} or an encrypted secret that contains a personal access token
    • Optional, defaults to ${{ github.token }}
  • support-label
    • Label used to mark issues as support requests
    • Optional, defaults to support
  • issue-comment
    • Comment to post on issues marked as support requests, {issue-author} is an optional placeholder
    • Optional, defaults to :wave: @{issue-author}, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.
  • close-issue
    • Close issues marked as support requests, value must be either true or false
    • Optional, defaults to true
  • lock-issue
    • Lock issues marked as support requests, value must be either true or false
    • Optional, defaults to false
  • issue-lock-reason
    • Reason for locking issues, value must be one of resolved, off-topic, too heated or spam
    • Optional, defaults to off-topic

Examples

The following workflow will comment on and close issues marked as support requests.

name: 'Support Requests'

on:
  issues:
    types: [labeled, unlabeled, reopened]

permissions:
  issues: write

jobs:
  action:
    runs-on: ubuntu-latest
    steps:
      - uses: dessant/support-requests@v2

Available input parameters

This workflow declares all the available input parameters of the action and their default values. Any of the parameters can be omitted.

name: 'Support Requests'

on:
  issues:
    types: [labeled, unlabeled, reopened]

permissions:
  issues: write

jobs:
  action:
    runs-on: ubuntu-latest
    steps:
      - uses: dessant/support-requests@v2
        with:
          github-token: ${{ github.token }}
          support-label: 'support'
          issue-comment: >
            :wave: @{issue-author}, we use the issue tracker exclusively
            for bug reports and feature requests. However, this issue appears
            to be a support request. Please use our support channels
            to get help with the project.
          close-issue: true
          lock-issue: false
          issue-lock-reason: 'off-topic'

Using a personal access token

The action uses an installation access token by default to interact with GitHub. You may also authenticate with a personal access token to perform actions as a GitHub user instead of the github-actions app.

Create a personal access token with the repo or public_repo scopes enabled, and add the token as an encrypted secret for the repository or organization, then provide the action with the secret using the github-token input parameter.

    steps:
      - uses: dessant/support-requests@v2
        with:
          github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

License

Copyright (c) 2017-2021 Armin Sebastian

This software is released under the terms of the MIT License. See the LICENSE file for further information.