|
6 | 6 | types: [labeled]
|
7 | 7 |
|
8 | 8 | 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 }}\"}]' |
16 | 16 |
|
17 | 17 | jobs:
|
18 | 18 | add-area-platform-issues-to-platform-project:
|
19 | 19 | runs-on: ubuntu-latest
|
20 | 20 | name: Add area/platform issue to Platform Project
|
21 | 21 | 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] |
23 | 26 | if: contains(github.event.issue.labels.*.name, 'area/platform')
|
24 | 27 | 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 }} |
28 | 31 | 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