fix: Use GA API for GitHub Projects
@@ -17,7 +17,7 @@ jobs:
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
- projectNext(number: $number) {
+ projectV2(number: $number) {
id
fields(first:20) {
nodes {
@@ -30,7 +30,7 @@ jobs:
}
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
- echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV
+ echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
- name: Add issue to project
env:
GITHUB_TOKEN: ${{ secrets.GH_PROJECT_AUTOMATION_AUTH }}
@@ -38,9 +38,9 @@ jobs:
run: |
item_id="$( gh api graphql -f query='
mutation($project:ID!, $issue:ID!) {
- addProjectNextItem(input: {projectId: $project, contentId: $issue}) {
- projectNextItem {
+ addProjectV2Item(input: {projectId: $project, contentId: $issue}) {
+ projectV2Item {
id
}
}
- }' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
+ }' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectV2Item.projectV2Item.id')"
