diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml new file mode 100644 index 000000000000..09806078a66d --- /dev/null +++ b/.github/workflows/add-to-project.yml @@ -0,0 +1,47 @@ +name: Add To Project +on: + issues: + types: [opened, labeled] + workflow_call: + secrets: + ADD_TO_PROJECT_PAT: + required: true + +env: + DESIGN_SYSTEM_PROJECT_URL: https://github.com/orgs/carbon-design-system/projects/39 + PROPOSALS_PROJECT_URL: https://github.com/orgs/carbon-design-system/projects/51 + TYPESCRIPT_PROJECT_URL: https://github.com/orgs/carbon-design-system/projects/51 + LABEL_ENHANCEMENT: 'type: enhancement 💡' + LABEL_TYPESCRIPT: 'area: typescript' + +jobs: + add-to-proposals-project: + name: Add issue with enhancement label to the Proposals project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.4.0 + with: + labeled: ${{ env.LABEL_ENHANCEMENT }} + project-url: ${{ env.PROPOSALS_PROJECT_URL }} + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} + + add-to-typescript-project: + name: Add issue with typescript label to the TypeScript Adoption project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.4.0 + with: + labeled: ${{ env.LABEL_TYPESCRIPT }} + project-url: ${{ env.TYPESCRIPT_PROJECT_URL }} + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} + + add-to-design-system-project: + name: Add issue to the Design System project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.4.0 + with: + labeled: ${{ env.LABEL_ENHANCEMENT }}, ${{ env.LABEL_TYPESCRIPT }} + label-operator: NOT + project-url: ${{ env.DESIGN_SYSTEM_PROJECT_URL }} + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml index 2b4f9efd2537..5e9b5402bbf0 100644 --- a/.github/workflows/issue-triage.yml +++ b/.github/workflows/issue-triage.yml @@ -10,8 +10,6 @@ on: required: true APP_PRIVATE_KEY: required: true - ADD_TO_PROJECT_PAT: - required: true jobs: comment: @@ -28,11 +26,3 @@ jobs: with: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} enabled: true - add-to-project: - name: Add issue to Design System project - runs-on: ubuntu-latest - steps: - - uses: actions/add-to-project@v0.4.0 - with: - project-url: https://github.com/orgs/carbon-design-system/projects/39 - github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}