:warning: PARTIALLY BROKEN - GitHub Action that closes or reopens issues when they are moved to a project column
:warning: The action does not work with modern projects: https://github.com/dessant/issue-states/issues/2
Issue States is a GitHub Action that closes or reopens issues when they are moved to a project column.
The continued development of Issue States 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.
issue-states.yml
workflow file in the .github/workflows
directory, use one of the example workflows to get startedopen-issue-columns
and closed-issue-columns
Issues which were already in the respective columns before the action was set up will not be processed. To process these issues, move them to a different column, then move them back.
Care must be taken during the use of the action to not conflict with project automation presets on GitHub.
The action can be configured using input parameters.
github-token
${{ github.token }}
or an encrypted
secret that contains a personal access token
${{ github.token }}
open-issue-columns
''
closed-issue-columns
Closed, Done
log-output
true
or false
false
issues
[{"owner": "actions", "repo": "toolkit", "issue_number": 1, "state": "closed"}]
, value of state
is either open
or closed
''
The following workflow will close issues when they are moved
to the Closed
or Done
project column.
name: 'Issue States'
on:
project_card:
types: [created, edited, moved]
permissions:
repository-projects: read
issues: write
pull-requests: write
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/issue-states@v3
This workflow declares all the available input parameters of the action and their default values. Any of the parameters can be omitted.
name: 'Issue States'
on:
project_card:
types: [created, edited, moved]
permissions:
repository-projects: read
issues: write
pull-requests: write
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/issue-states@v3
with:
github-token: ${{ github.token }}
open-issue-columns: ''
closed-issue-columns: 'Closed, Done'
log-output: false
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/issue-states@v3
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Copyright (c) 2018-2023 Armin Sebastian
This software is released under the terms of the MIT License. See the LICENSE file for further information.