Table of Contents
Click to expand
Automation to automatically synchronize the status of GitHub Issues (Opened, Closed, or Labeled) with the columns of a Kanban board (GitHub Projects V2) without requiring manual intervention.
Click to expand
This GitHub Actions workflow moves cards (Issues) between columns in your global GitHub Project (v2) based on issue events:
- New Issue (or Reopened): Automatically places it in the
Todocolumn. in-progresslabel added: Moves it to theIn Progresscolumn. (Pairs perfectly with github-roadmap-sync!)- Closed Issue: Automatically moves it to the
Donecolumn.
Click to expand
- Copy the
.github/workflows/project-sync.ymlfile into your destination repository. - Open the
.github/workflows/project-sync.ymlfile and changeproject_id: 1to your actual project number.Note: You can find this number in the URL of your Kanban board. If the URL is
github.com/users/xscriptor/projects/2, your ID is2.
If you already have other Workflows in your repository, you can simply leave this file as a separate file.
Just place project-sync.yml inside the .github/workflows/ directory next to your existing .yml files. GitHub Actions runs them completely independently, so they will not interfere with each other!
Click to expand
The new GitHub Projects V2 API (being tied to your global xscriptor account rather than a single project) does not work with the default generic Actions token. It requires extended permissions:
- Create a Personal Access Token (Classic).
- Grant it the following permissions:
repo,projectandread:user. - Go to your destination repository Settings > Secrets and variables > Actions > New repository secret.
- Name it
PROJECT_PATand paste your token.
Click to expand
You can change the names of the columns where the bot will push the cards. If your board has columns like "To Do" or "Completed", edit the project-sync.yml file by modifying the status_value variable:
status_value: "To Do"