vega-frontend-monorepo/.github/workflows/add_issue_new_projects.yml
2022-04-25 15:03:58 +01:00

26 lines
761 B
YAML

---
name: Auto Assign Issue to New Project
'on':
issues:
types: [opened]
jobs:
add_issue:
runs-on: ubuntu-latest
steps:
- name: Add Issue to New Front End Project Board
env:
GITHUB_TOKEN: ${{ secrets.GH_NEW_CARD_TO_PROJECT }}
PROJECT_ID: ${{ secrets.FRONT_END_PROJECT_ID }}
ISSUE_ID: ${{ github.event.issue.node_id }}
run: |
gh api graphql -f query='
mutation($project:ID!, $issue:ID!) {
addProjectNextItem(input: {projectId: $project, contentId: $issue}) {
projectNextItem {
id
}
}
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectNextItem.projectNextItem.id'