Skip to content

Auto wire oss and cloud issues #11596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 36 additions & 5 deletions .github/workflows/platform-project-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
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
CLOUD_PROJECT_ID: 6 # https://github.com/orgs/airbytehq/projects/6/views/8
OSS_PROJECT_ID: 11 # https://github.com/orgs/airbytehq/projects/11
FIELD_STATUS: Status
STATUS_TODO: Todo
FIELD_DATE_ADDED: Date Added
Expand All @@ -21,14 +22,44 @@ jobs:
- 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

- name: Add issue to the cloud project if labelled with area/platform and not area/platform-oss
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea, but I wonder what happens if somebody first adds the area/platform label and then immediately adds the area/platform-oss label? I guess we can just see what happens in practice and adjust if needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a good point. I think that for now we can make sure that the board have an appropriated filter

uses: leonsteinhaeuser/[email protected]
if: contains(github.event.issue.labels.*.name, 'area/platform') && !contains(github.event.issue.labels.*.name, 'area/platform-oss')
with:
gh_token: ${{ env.GH_PROJECT_TOKEN }}
organization: ${{ env.ORG }}
project_id: ${{ env.CLOUD_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 }}\"}]'
- name: Add issue to the cloud oss if labelled with area/platform and not area/platform-cloud
uses: leonsteinhaeuser/[email protected]
if: contains(github.event.issue.labels.*.name, 'area/platform') && !contains(github.event.issue.labels.*.name, 'area/platform-cloud')
with:
gh_token: ${{ env.GH_PROJECT_TOKEN }}
organization: ${{ env.ORG }}
project_id: ${{ env.OSS_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 }}\"}]'
- name: Add issue to project if labelled with area/platform-cloud
uses: leonsteinhaeuser/[email protected]
if: contains(github.event.issue.labels.*.name, 'area/platform-cloud')
with:
gh_token: ${{ env.GH_PROJECT_TOKEN }}
organization: ${{ env.ORG }}
project_id: ${{ env.CLOUD_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 }}\"}]'
- name: Add issue to project if labelled with area/platform-oss
uses: leonsteinhaeuser/[email protected]
if: contains(github.event.issue.labels.*.name, 'area/platform')
if: contains(github.event.issue.labels.*.name, 'area/platform-oss')
with:
gh_token: ${{ env.GH_PROJECT_TOKEN }}
organization: ${{ env.ORG }}
project_id: ${{ env.PROJECT_ID }}
project_id: ${{ env.OSS_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 }}\"}]'