Skip to content

Commit 6547da0

Browse files
authored
Update 99-add-issue-to-project.yml
1 parent 5b5c4fd commit 6547da0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/99-add-issue-to-project.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,22 @@ jobs:
2727
}' -q .data.repository.issue.id)
2828
echo "ISSUE_ID=$issue_id" >> $GITHUB_ENV
2929
30-
- name: Verify access to project
30+
- name: Verify DEV_PROJECT_ID
3131
env:
3232
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3333
DEV_PROJECT_ID: ${{ secrets.DEV_PROJECT_ID }}
34+
ORG: ${{ github.repository_owner }}
3435
run: |
3536
result=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
3637
-H "Accept: application/vnd.github.v3+json" \
37-
"https://api.github.com/projects/$DEV_PROJECT_ID")
38+
"https://api.github.com/orgs/$ORG/projects/$DEV_PROJECT_ID")
3839
3940
echo "Project response: $result"
4041
4142
if echo "$result" | jq -e . >/dev/null 2>&1; then
4243
project_state=$(echo $result | jq -r '.state')
43-
if [ "$project_state" != "active" ]; then
44-
echo "Project is not active or not found"
44+
if [ "$project_state" != "open" ]; then
45+
echo "Project is not open or not found"
4546
exit 1
4647
fi
4748
else
@@ -54,6 +55,7 @@ jobs:
5455
env:
5556
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5657
DEV_PROJECT_ID: ${{ secrets.DEV_PROJECT_ID }}
58+
ORG: ${{ github.repository_owner }}
5759
run: |
5860
columns=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
5961
-H "Accept: application/vnd.github.inertia-preview+json" \

0 commit comments

Comments
 (0)