chore: update add issues to project action (#1975)
* chore: update add issues to project action chore: update add issues to project action The GitHub projects API has been replaced with ProjectsV2. This PR corrects the add issues to project action. * style: fix formatting Co-authored-by: Dexter <dexter.edwards93@gmail.com>
This commit is contained in:
parent
64b06ca801
commit
37882378b6
24
.github/workflows/add_issue_new_projects.yml
vendored
24
.github/workflows/add_issue_new_projects.yml
vendored
@ -1,25 +1,27 @@
|
|||||||
---
|
---
|
||||||
name: Auto Assign Issue to New Project
|
name: 'Add Issues To Project Board'
|
||||||
|
|
||||||
'on':
|
'on':
|
||||||
issues:
|
issues:
|
||||||
types: [opened]
|
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 }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
add_issue:
|
add_issue:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add Issue to New Front End Project Board
|
- name: 'Add issue to 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: |
|
run: |
|
||||||
gh api graphql -f query='
|
gh api graphql -f query='
|
||||||
mutation($project:ID!, $issue:ID!) {
|
mutation($user:String!, $project:ID!, $issue:ID!) {
|
||||||
addProjectNextItem(input: {projectId: $project, contentId: $issue}) {
|
addProjectV2ItemById(input: {clientMutationId: $user, projectId: $project, contentId: $issue}) {
|
||||||
projectNextItem {
|
item {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectNextItem.projectNextItem.id'
|
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID -f user=$USER
|
||||||
|
Loading…
Reference in New Issue
Block a user