https://github.com/dessant/support-requests
GitHub Action that comments on and closes issues labeled as support requests
https://github.com/dessant/support-requests
github-actions issues support
Last synced: 10 months ago
JSON representation
GitHub Action that comments on and closes issues labeled as support requests
- Host: GitHub
- URL: https://github.com/dessant/support-requests
- Owner: dessant
- License: mit
- Created: 2017-11-03T05:17:07.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2023-11-15T00:32:22.000Z (about 2 years ago)
- Last Synced: 2024-10-29T12:58:49.353Z (about 1 year ago)
- Topics: github-actions, issues, support
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/support-requests
- Size: 1.85 MB
- Stars: 35
- Watchers: 3
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://armin.dev/go/patreon?pr=support-requests&src=repo),
[PayPal](https://armin.dev/go/paypal?pr=support-requests&src=repo) or
[Bitcoin](https://armin.dev/go/bitcoin?pr=support-requests&src=repo).
## Description
Support Requests is a specialized version of
[Label Actions](https://github.com/dessant/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-requests.yml` workflow file in the `.github/workflows`
directory, use one of the [example workflows](#examples) to get started.
### Inputs
The action can be configured using [input parameters](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepswith).
- **`github-token`**
- GitHub access token, value must be `${{ github.token }}` or an encrypted
secret that contains a [personal access token](#using-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`
- **`issue-close-reason`**
- Reason for closing issues, value must be
either `completed` or `not planned`
- Optional, defaults to `not planned`
- **`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.
```yaml
name: 'Support Requests'
on:
issues:
types: [labeled, unlabeled, reopened]
permissions:
issues: write
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/support-requests@v4
```
### 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.
```yaml
name: 'Support Requests'
on:
issues:
types: [labeled, unlabeled, reopened]
permissions:
issues: write
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/support-requests@v4
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
issue-close-reason: 'not planned'
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](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic)
with the `repo` or `public_repo` scopes enabled, and add the token as an
[encrypted secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository)
for the repository or organization, then provide the action with the secret
using the `github-token` input parameter.
```yaml
steps:
- uses: dessant/support-requests@v4
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
```
## License
Copyright (c) 2017-2023 Armin Sebastian
This software is released under the terms of the MIT License.
See the [LICENSE](LICENSE) file for further information.