8
8
env :
9
9
GH_PROJECT_TOKEN : ${{ secrets.PARKER_PAT_FOR_PLATFORM_PROJECT_AUTOMATION }}
10
10
ORG : airbytehq
11
- PROJECT_ID : 6 # https://github.com/orgs/airbytehq/projects/6/views/8
11
+ CLOUD_PROJECT_ID : 6 # https://github.com/orgs/airbytehq/projects/6/views/8
12
+ OSS_PROJECT_ID : 11 # https://github.com/orgs/airbytehq/projects/11
12
13
FIELD_STATUS : Status
13
14
STATUS_TODO : Todo
14
15
FIELD_DATE_ADDED : Date Added
@@ -21,14 +22,44 @@ jobs:
21
22
- name : Set current date env var
22
23
id : set_date
23
24
run : echo ::set-output name=CURRENT_DATE::$(date +'%Y-%m-%dT%H:%M:%S%z')
24
-
25
- - name : Add issue to project if labelled with area/platform
25
+
26
+ - name : Add issue to the cloud project if labelled with area/platform and not area/platform-oss
27
+ uses :
leonsteinhaeuser/[email protected]
28
+ if : contains(github.event.issue.labels.*.name, 'area/platform') && !contains(github.event.issue.labels.*.name, 'area/platform-oss')
29
+ with :
30
+ gh_token : ${{ env.GH_PROJECT_TOKEN }}
31
+ organization : ${{ env.ORG }}
32
+ project_id : ${{ env.CLOUD_PROJECT_ID }}
33
+ resource_node_id : ${{ github.event.issue.node_id }}
34
+ operation_mode : custom_field
35
+ custom_field_values : ' [{\"name\": \"Status\",\"type\": \"single_select\",\"value\": \"${{ env.STATUS_TODO }}\"},{\"name\": \"${{ env.FIELD_DATE_ADDED }}\",\"type\": \"date\",\"value\": \"${{ steps.set_date.outputs.CURRENT_DATE }}\"}]'
36
+ - name : Add issue to the cloud oss if labelled with area/platform and not area/platform-cloud
37
+ uses :
leonsteinhaeuser/[email protected]
38
+ if : contains(github.event.issue.labels.*.name, 'area/platform') && !contains(github.event.issue.labels.*.name, 'area/platform-cloud')
39
+ with :
40
+ gh_token : ${{ env.GH_PROJECT_TOKEN }}
41
+ organization : ${{ env.ORG }}
42
+ project_id : ${{ env.OSS_PROJECT_ID }}
43
+ resource_node_id : ${{ github.event.issue.node_id }}
44
+ operation_mode : custom_field
45
+ custom_field_values : ' [{\"name\": \"Status\",\"type\": \"single_select\",\"value\": \"${{ env.STATUS_TODO }}\"},{\"name\": \"${{ env.FIELD_DATE_ADDED }}\",\"type\": \"date\",\"value\": \"${{ steps.set_date.outputs.CURRENT_DATE }}\"}]'
46
+ - name : Add issue to project if labelled with area/platform-cloud
47
+ uses :
leonsteinhaeuser/[email protected]
48
+ if : contains(github.event.issue.labels.*.name, 'area/platform-cloud')
49
+ with :
50
+ gh_token : ${{ env.GH_PROJECT_TOKEN }}
51
+ organization : ${{ env.ORG }}
52
+ project_id : ${{ env.CLOUD_PROJECT_ID }}
53
+ resource_node_id : ${{ github.event.issue.node_id }}
54
+ operation_mode : custom_field
55
+ custom_field_values : ' [{\"name\": \"Status\",\"type\": \"single_select\",\"value\": \"${{ env.STATUS_TODO }}\"},{\"name\": \"${{ env.FIELD_DATE_ADDED }}\",\"type\": \"date\",\"value\": \"${{ steps.set_date.outputs.CURRENT_DATE }}\"}]'
56
+ - name : Add issue to project if labelled with area/platform-oss
26
57
uses :
leonsteinhaeuser/[email protected]
27
- if : contains(github.event.issue.labels.*.name, 'area/platform')
58
+ if : contains(github.event.issue.labels.*.name, 'area/platform-oss ')
28
59
with :
29
60
gh_token : ${{ env.GH_PROJECT_TOKEN }}
30
61
organization : ${{ env.ORG }}
31
- project_id : ${{ env.PROJECT_ID }}
62
+ project_id : ${{ env.OSS_PROJECT_ID }}
32
63
resource_node_id : ${{ github.event.issue.node_id }}
33
64
operation_mode : custom_field
34
65
custom_field_values : ' [{\"name\": \"Status\",\"type\": \"single_select\",\"value\": \"${{ env.STATUS_TODO }}\"},{\"name\": \"${{ env.FIELD_DATE_ADDED }}\",\"type\": \"date\",\"value\": \"${{ steps.set_date.outputs.CURRENT_DATE }}\"}]'
0 commit comments