A GitHub Action that automatically moves closed issues to the top of a specified column in GitHub Project V2.
When an issue is closed, this action:
- Checks if the issue belongs to a specific GitHub Project V2
- Updates the issue's status to the specified column (default: "Done")
- Moves the issue to the TOP of that column
This ensures that recently closed issues are always visible at the top of your project board.
Create a workflow file (e.g., .github/workflows/move-closed-issue.yaml):
name: Move Closed Issue to Top
on:
issues:
types: [closed]
jobs:
move-to-top:
runs-on: ubuntu-latest
steps:
- uses: wozaki/project-closed-issue-move-to-top-action@v1
with:
project-number: 1
github-token: ${{ secrets.PROJECT_PAT }} # PAT or GitHub App token with project scopeYou can configure the action to update multiple projects with different settings using a matrix strategy:
name: Move Closed Issue to Top
on:
issues:
types: [closed]
jobs:
move-to-top:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- project-number: 1
status-name: Done
- project-number: 2
status-name: Completed
- project-number: 5
organization: other-user
status-name: Archived
steps:
- uses: wozaki/project-closed-issue-move-to-top-action@v1
with:
organization: ${{ matrix.organization || '' }}
project-number: ${{ matrix.project-number }}
status-name: ${{ matrix.status-name || 'Done' }}
github-token: ${{ secrets.PROJECT_PAT }}| Name | Required | Default | Description |
|---|---|---|---|
organization |
No | Repository owner | Organization or User name that owns the project |
project-number |
Yes | - | GitHub Project V2 number |
status-name |
No | Done |
Target status column name |
github-token |
Yes | - | GitHub token with project and repo permissions (PAT or GitHub App token) |
None.