Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f5c60bd

Browse files
Add project board workflow (vapor#195)
1 parent 7c266b5 commit f5c60bd

File tree

1 file changed

+21
-62
lines changed

1 file changed

+21
-62
lines changed
Lines changed: 21 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,31 @@
1-
name: first-issues-to-beginner-issues-project
1+
name: issue-to-project-board-workflow
22
on:
33
# Trigger when an issue gets labeled or deleted
44
issues:
55
types: [reopened, closed, labeled, unlabeled, assigned, unassigned]
66

77
jobs:
8-
manage_project_issues:
9-
strategy:
10-
fail-fast: false
11-
matrix:
12-
project:
13-
- 'Beginner Issues'
8+
setup_matrix_input:
149
runs-on: ubuntu-latest
15-
if: contains(github.event.issue.labels.*.name, 'good first issue')
16-
steps:
17-
# When an issue that is open is labeled, unassigned or reopened without a assigned member
18-
# create or move the card to "To do"
19-
- name: Create or Update Project Card
20-
if: |
21-
github.event.action == 'labeled' ||
22-
github.event.action == 'reopened' ||
23-
github.event.action == 'unassigned'
24-
uses: alex-page/github-project-automation-plus@v0.8.1
25-
with:
26-
project: ${{ matrix.project }}
27-
column: 'To do'
28-
repo-token: ${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}
29-
30-
# When an issue that is open is assigned and has an assigned member
31-
# create or move the card to "In progress"
32-
- name: Assign Project Card
33-
if: |
34-
github.event.action == 'assigned'
35-
uses: alex-page/github-project-automation-plus@v0.8.1
36-
with:
37-
project: ${{ matrix.project }}
38-
column: 'In progress'
39-
repo-token: ${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}
4010

41-
# When an issue is closed with the good first issue tag
42-
# Create or move the card to "Done"
43-
- name: Close Project Card
44-
if: |
45-
github.event.action == 'closed'
46-
uses: asmfnk/my-github-project-automation@v0.5.0
47-
with:
48-
project: ${{ matrix.project }}
49-
column: 'Done'
50-
repo-token: ${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}
51-
52-
remove_project_issues:
53-
strategy:
54-
fail-fast: false
55-
matrix:
56-
project:
57-
- 'Beginner Issues'
58-
runs-on: ubuntu-latest
59-
if: ${{ !contains(github.event.issue.labels.*.name, 'good first issue') }}
6011
steps:
61-
# When an issue has the tag 'good first issue' removed
62-
# Remove the card from the board
63-
- name: Remove Project Card
64-
if: |
65-
github.event.action == 'unlabeled'
66-
uses: alex-page/github-project-automation-plus@v0.8.1
67-
with:
68-
project: ${{ matrix.project }}
69-
column: 'To do'
70-
repo-token: ${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}
71-
action: delete
12+
- id: set-matrix
13+
run: |
14+
output=$(curl ${{ github.event.issue.url }}/labels | jq '.[] | .name')
7215
16+
echo '======================'
17+
echo 'Process incoming data'
18+
echo '======================'
19+
json=$(echo $output | sed 's/"\s"/","/g')
20+
echo $json
21+
echo "::set-output name=matrix::$(echo $json)"
22+
outputs:
23+
issueTags: ${{ steps.set-matrix.outputs.matrix }}
24+
25+
Manage_project_issues:
26+
needs: setup_matrix_input
27+
uses: vapor/ci/.github/workflows/issues-to-project-board.yml@main
28+
with:
29+
labelsJson: ${{ needs.setup_matrix_input.outputs.issueTags }}
30+
secrets:
31+
PROJECT_BOARD_AUTOMATION_PAT: "${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}"

0 commit comments

Comments
(0)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /