@@ -14,19 +14,14 @@ jobs:
1414 - name : Install jq
1515 run : sudo apt-get update && sudo apt-get install -y jq
1616
17- - name : Authenticate GitHub CLI
18- env :
19- GH_TOKEN : ${{ secrets.UPDATE_PROJECT_V2_PAT }}
20- run : echo "${GH_TOKEN}" | gh auth login --with-token
21-
22- - name : Debug - List projects linked to this issue
17+ - name : Debug - List project items linked to this issue
2318 env :
2419 GH_TOKEN : ${{ secrets.UPDATE_PROJECT_V2_PAT }}
2520 run : |
26- echo "🔍 Listing all projects linked to issue ${{ github.event.issue.number }}..."
21+ echo "🔍 Listing all project items linked to issue ${{ github.event.issue.number }}..."
2722 gh issue view ${{ github.event.issue.number }} \
2823 --repo ${{ github.repository }} \
29- --json projectsV2 \
24+ --json projectItems \
3025 | jq .
3126
3227 - name : Set Remaining Days to 0 if issue is in Project 183
@@ -35,11 +30,11 @@ jobs:
3530 run : |
3631 echo "🔍 Checking if issue ${{ github.event.issue.number }} belongs to Project 183..."
3732
38- # Find the project item ID for project 183 among the issue’s linked projects
33+ # Get the project item ID from projectItems
3934 ITEM_ID=$(gh issue view ${{ github.event.issue.number }} \
4035 --repo ${{ github.repository }} \
41- --json projectsV2 \
42- | jq -r '.projectsV2 [] | select(.number==183) | .item .id')
36+ --json projectItems \
37+ | jq -r '.projectItems [] | select(.project. number==183) | .id')
4338
4439 if [ -z "$ITEM_ID" ]; then
4540 echo "ℹ️ Issue is not in Project 183. Nothing to update."
0 commit comments