Skip to content

Commit

Permalink
Update 99-add-issue-to-project.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mfranzke authored Dec 11, 2024
1 parent 2bb7e4a commit 5b5c4fd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/99-add-issue-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,28 @@ jobs:
}' -q .data.repository.issue.id)
echo "ISSUE_ID=$issue_id" >> $GITHUB_ENV
- name: Verify access to project
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEV_PROJECT_ID: ${{ secrets.DEV_PROJECT_ID }}
run: |
result=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/projects/$DEV_PROJECT_ID")
echo "Project response: $result"
if echo "$result" | jq -e . >/dev/null 2>&1; then
project_state=$(echo $result | jq -r '.state')
if [ "$project_state" != "active" ]; then
echo "Project is not active or not found"
exit 1
fi
else
echo "Failed to parse project response as JSON."
exit 1
fi
- name: Get columns in project
id: get_columns
env:
Expand Down

0 comments on commit 5b5c4fd

Please sign in to comment.