2021-12-10 13:35:23 +00:00
|
|
|
---
|
2022-11-08 11:07:10 +00:00
|
|
|
name: 'Add Issues To Project Board'
|
2021-12-10 13:35:23 +00:00
|
|
|
|
2022-04-25 14:03:58 +00:00
|
|
|
'on':
|
2021-12-10 13:35:23 +00:00
|
|
|
issues:
|
2022-11-08 11:07:10 +00:00
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GH_NEW_CARD_TO_PROJECT }}
|
|
|
|
PROJECT_ID: ${{ secrets.FRONT_END_PROJECT_ID }}
|
|
|
|
ISSUE_ID: ${{ github.event.issue.node_id }}
|
|
|
|
USER: ${{ github.actor }}
|
2021-12-10 13:35:23 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
add_issue:
|
2023-04-03 13:53:50 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2021-12-10 13:35:23 +00:00
|
|
|
steps:
|
2022-11-08 11:07:10 +00:00
|
|
|
- name: 'Add issue to project board'
|
2021-12-10 13:35:23 +00:00
|
|
|
run: |
|
|
|
|
gh api graphql -f query='
|
2022-11-08 11:07:10 +00:00
|
|
|
mutation($user:String!, $project:ID!, $issue:ID!) {
|
|
|
|
addProjectV2ItemById(input: {clientMutationId: $user, projectId: $project, contentId: $issue}) {
|
|
|
|
item {
|
2021-12-10 13:35:23 +00:00
|
|
|
id
|
|
|
|
}
|
|
|
|
}
|
2022-11-08 11:07:10 +00:00
|
|
|
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID -f user=$USER
|