Skip to content
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

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

Merged
35 changes: 35 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Add To Project
on:
issues:
types: [opened]
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
LABEL_ENHANCEMENT: 'type: enhancement 💡'

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 }}
Comment on lines +18 to +26
Copy link
Member Author

Choose a reason for hiding this comment

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

@sstrubberg Based on our conversations yesterday, I just added this here that will add issues with the type: enhancement 💡 label to the Proposals project. These will no longer be added to the Design System project by default. Let me know what you think!


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 }}
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 }}