Skip to content

Commit

Permalink
Add project board workflow (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyDeBock authored Mar 7, 2022
1 parent ea152d6 commit 452b034
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/projectboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: first-issues-to-beginner-issues-project
on:
# Trigger when an issue gets labeled or deleted
issues:
types: [reopened, closed, labeled, unlabeled, assigned, unassigned]

jobs:
manage_project_issues:
strategy:
fail-fast: false
matrix:
project:
- 'Beginner Issues'
runs-on: ubuntu-latest
if: contains(github.event.issue.labels.*.name, 'good first issue')
steps:
# When an issue that is open is labeled, unassigned or reopened without a assigned member
# create or move the card to "To do"
- name: Create or Update Project Card
if: |
github.event.action == 'labeled' ||
github.event.action == 'reopened' ||
github.event.action == 'unassigned'
uses: alex-page/[email protected]
with:
project: ${{ matrix.project }}
column: 'To do'
repo-token: ${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}

# When an issue that is open is assigned and has an assigned member
# create or move the card to "In progress"
- name: Assign Project Card
if: |
github.event.action == 'assigned'
uses: alex-page/[email protected]
with:
project: ${{ matrix.project }}
column: 'In progress'
repo-token: ${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}

# When an issue is closed with the good first issue tag
# Create or move the card to "Done"
- name: Close Project Card
if: |
github.event.action == 'closed'
uses: asmfnk/[email protected]
with:
project: ${{ matrix.project }}
column: 'Done'
repo-token: ${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}

remove_project_issues:
strategy:
fail-fast: false
matrix:
project:
- 'Beginner Issues'
runs-on: ubuntu-latest
if: ${{ !contains(github.event.issue.labels.*.name, 'good first issue') }}
steps:
# When an issue has the tag 'good first issue' removed
# Remove the card from the board
- name: Remove Project Card
if: |
github.event.action == 'unlabeled'
uses: alex-page/[email protected]
with:
project: ${{ matrix.project }}
column: 'To do'
repo-token: ${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}
action: delete

0 comments on commit 452b034

Please sign in to comment.