Skip to content

Commit 4bed602

Browse files
committed
try adding custom fields
1 parent 1c6b1fb commit 4bed602

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

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

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,28 @@ on:
66
types: [labeled]
77

88
env:
9-
gh_project_token: ${{ secrets.PARKER_PAT_FOR_PLATFORM_PROJECT_AUTOMATION }}
10-
organization: airbytehq
11-
project_id: 6 # https://github.com/orgs/airbytehq/projects/6/views/8
12-
# map fields with customized labels
13-
todo: Todo
14-
done: Done
15-
in_progress: In Progress
9+
GH_PROJECT_TOKEN: ${{ secrets.PARKER_PAT_FOR_PLATFORM_PROJECT_AUTOMATION }}
10+
ORG: airbytehq
11+
PROJECT_ID: 6 # https://github.com/orgs/airbytehq/projects/6/views/8
12+
FIELD_STATUS: Status
13+
STATUS_TODO: Todo
14+
FIELD_DATE_ADDED: Date Added
15+
FIELD_VALUES_TO_SET: '[{\"name\": \"Status\",\"type\": \"single_select\",\"value\": \"${{ env.STATUS_TODO }}\"},{\"name\": \"${{ env.FIELD_DATE_ADDED }}\",\"type\": \"date\",\"value\": \"${{ env.CURRENT_DATE }}\"}]'
1616

1717
jobs:
1818
add-area-platform-issues-to-platform-project:
1919
runs-on: ubuntu-latest
2020
name: Add area/platform issue to Platform Project
2121
steps:
22-
- uses: leonsteinhaeuser/[email protected]
22+
- name: Set current date env var
23+
run: echo "CURRENT_DATE=$(date +'%D')"
24+
- name: Add issue to project if labelled with area/platform
25+
uses: leonsteinhaeuser/[email protected]
2326
if: contains(github.event.issue.labels.*.name, 'area/platform')
2427
with:
25-
gh_token: ${{ env.gh_project_token }}
26-
organization: ${{ env.organization }}
27-
project_id: ${{ env.project_id }}
28+
gh_token: ${{ env.GH_PROJECT_TOKEN }}
29+
organization: ${{ env.ORG }}
30+
project_id: ${{ env.PROJECT_ID }}
2831
resource_node_id: ${{ github.event.issue.node_id }}
29-
status_value: ${{ env.todo }} # Target status
32+
operation_mode: custom_field
33+
custom_field_values: ${{ env.FIELD_VALUES_TO_SET }}

0 commit comments

Comments
 (0)