Skip to content

wozaki/project-closed-issue-move-to-top-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Move Closed Issue to Top of Project Column

ts License

A GitHub Action that automatically moves closed issues to the top of a specified column in GitHub Project V2.

Overview

When an issue is closed, this action:

  1. Checks if the issue belongs to a specific GitHub Project V2
  2. Updates the issue's status to the specified column (default: "Done")
  3. 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.

Usage

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 scope

Using with Multiple Projects

You 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 }}

Specification

Inputs

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)

Outputs

None.

About

A GitHub Action to automatically move closed issues to the top of the "Done" column in Projects V2.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors