forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatform-project-automation.yml
More file actions
34 lines (30 loc) · 1.35 KB
/
Copy pathplatform-project-automation.yml
File metadata and controls
34 lines (30 loc) · 1.35 KB
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
# See https://github.com/marketplace/actions/project-beta-automations for guidance
name: Platform Project Automation
on:
issues:
types: [labeled]
env:
GH_PROJECT_TOKEN: ${{ secrets.PARKER_PAT_FOR_PLATFORM_PROJECT_AUTOMATION }}
ORG: airbytehq
PROJECT_ID: 6 # https://github.com/orgs/airbytehq/projects/6/views/8
FIELD_STATUS: Status
STATUS_TODO: Todo
FIELD_DATE_ADDED: Date Added
jobs:
add-area-platform-issues-to-platform-project:
runs-on: ubuntu-latest
name: Add area/platform issue to Platform Project
steps:
- name: Set current date env var
id: set_date
run: echo ::set-output name=CURRENT_DATE::$(date +'%Y-%m-%dT%H:%M:%S%z')
- name: Add issue to project if labelled with area/platform
uses: leonsteinhaeuser/[email protected]
if: contains(github.event.issue.labels.*.name, 'area/platform')
with:
gh_token: ${{ env.GH_PROJECT_TOKEN }}
organization: ${{ env.ORG }}
project_id: ${{ env.PROJECT_ID }}
resource_node_id: ${{ github.event.issue.node_id }}
operation_mode: custom_field
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 }}\"}]'