File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 19
19
PR_NUMBER=${{ github.event.pull_request.number }}
20
20
OWNER=${{ github.repository_owner }}
21
21
REPO=${{ github.event.repository.name }}
22
-
22
+
23
23
echo "Fetching Project Item ID..."
24
-
24
+
25
25
ITEM_ID=$(gh api graphql -f query='
26
26
query {
27
27
repository(owner : " '" $OWNER"'", name: "'"$REPO"'") {
37
37
}
38
38
}
39
39
}' --jq '.data.repository.pullRequest.projectItems.nodes[] | select(.project.id=="'"$DEV_PROJECT_ID"'") | .id')
40
-
41
- echo "Project Item ID: $ITEM_ID"
40
+
41
+ echo "Fetched ITEM_ID : $ITEM_ID"
42
+
43
+ if [[ -z "$ITEM_ID" ]]; then
44
+ echo "❌ ERROR : No Project Item ID found! Please check the project association."
45
+ exit 1
46
+ fi
47
+
42
48
echo "ITEM_ID=$ITEM_ID" >> $GITHUB_ENV
43
49
44
50
- name : Debug – Get PR Project Status – Only __typename
You can’t perform that action at this time.
0 commit comments