Skip to content

Commit d21fcbb

Browse files
authored
Auto wire oss and cloud issues (#11596)
1 parent 69841ce commit d21fcbb

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

.github/workflows/platform-project-automation.yml

+36-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
env:
99
GH_PROJECT_TOKEN: ${{ secrets.PARKER_PAT_FOR_PLATFORM_PROJECT_AUTOMATION }}
1010
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
1213
FIELD_STATUS: Status
1314
STATUS_TODO: Todo
1415
FIELD_DATE_ADDED: Date Added
@@ -21,14 +22,44 @@ jobs:
2122
- name: Set current date env var
2223
id: set_date
2324
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
2657
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')
2859
with:
2960
gh_token: ${{ env.GH_PROJECT_TOKEN }}
3061
organization: ${{ env.ORG }}
31-
project_id: ${{ env.PROJECT_ID }}
62+
project_id: ${{ env.OSS_PROJECT_ID }}
3263
resource_node_id: ${{ github.event.issue.node_id }}
3364
operation_mode: custom_field
3465
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

Comments
 (0)