Skip to content

Commit

Permalink
ci(project): move add-to-project job into a separate workflow (#12659)
Browse files Browse the repository at this point in the history
* ci(project): move add-to-project job into a separate workflow

* ci(project): move add-to-project job into a separate workflow

* ci(add-to-project): add typescript issues to proper project

* ci(add-to-project): add typescript issues to proper project

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
tay1orjones and kodiakhq[bot] committed Dec 2, 2022
1 parent 00fdab6 commit 2551cd5
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 10 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -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 }}
10 changes: 0 additions & 10 deletions .github/workflows/issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ on:
required: true
APP_PRIVATE_KEY:
required: true
ADD_TO_PROJECT_PAT:
required: true

jobs:
comment:
Expand All @@ -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 }}

0 comments on commit 2551cd5

Please sign in to comment.