Skip to content

Commit 904a74a

Browse files
committed
Add issue project automation workflow
This adds automated project management: - Auto-add new issues to project #6 - Build label automation (B16, B17, etc.) - Sprint-backlog automation
1 parent c9ce28d commit 904a74a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Issue Project Automation
2+
3+
on:
4+
issues:
5+
types: [opened, labeled, unlabeled]
6+
7+
jobs:
8+
# When an issue is opened, add it to default project(s)
9+
add-new-issue-to-project:
10+
if: github.event.action == 'opened'
11+
uses: NASA-PDS/.github/.github/workflows/add-issue-to-project.yml@main
12+
with:
13+
issue_number: ${{ github.event.issue.number }}
14+
repository: ${{ github.repository }}
15+
# Update project_numbers below based on your needs
16+
# Single project: project_numbers: "6"
17+
# Multiple projects: project_numbers: "6,22"
18+
project_numbers: "6"
19+
secrets:
20+
# IMPORTANT: GITHUB_TOKEN does not have permission for org projects
21+
# You must create a PAT with 'project' scope and add it as ORG_PROJECT_PAT
22+
# See workflow-templates/README.md for setup instructions
23+
gh_token: ${{ secrets.ORG_PROJECT_PAT }}
24+
25+
# When a label is added or removed, handle build labels and sprint-backlog automation
26+
handle-label:
27+
if: github.event.action == 'labeled' || github.event.action == 'unlabeled'
28+
uses: NASA-PDS/.github/.github/workflows/label-to-project.yml@main
29+
with:
30+
issue_number: ${{ github.event.issue.number }}
31+
repository: ${{ github.repository }}
32+
label_name: ${{ github.event.label.name }}
33+
action: ${{ github.event.action }}
34+
secrets:
35+
gh_token: ${{ secrets.ORG_PROJECT_PAT }}

0 commit comments

Comments
 (0)