-
Notifications
You must be signed in to change notification settings - Fork 12
39 lines (34 loc) · 1.24 KB
/
In Progress.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Add Issue to Project and Update Status
on:
issues:
types:
- labeled
- assigned
jobs:
process-issue:
runs-on: ubuntu-latest
steps:
- name: Check if Issue Has "data" Label and an Assignee
id: check_conditions
uses: actions/github-script@v6
with:
script: |
const issue = context.payload.issue;
const hasDataLabel = issue.labels.some(label => label.name === 'data queue');
const hasAssignee = issue.assignees.length > 0;
return hasDataLabel && hasAssignee;
- name: Add Issue to Project
if: steps.check_conditions.outputs.result == 'true'
id: add_to_project
uses: actions/[email protected]
with:
project-url: https://github.com/users/ben-domingue/projects/1
github-token: ${{ secrets.PROJECTS_TEST }}
- name: Update Project Item Status to "In Progress"
if: steps.check_conditions.outputs.result == 'true'
uses: nipe0324/[email protected]
with:
project-url: https://github.com/users/ben-domingue/projects/1
github-token: ${{ secrets.PROJECTS_TEST }}
field-name: Status
field-value: In Progress