Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Commit

Permalink
hmmmm
Browse files Browse the repository at this point in the history
  • Loading branch information
jgomez720 committed Sep 13, 2024
1 parent 3909af1 commit 8063947
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/assign-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ jobs:
run: |
users=("jgomez720" "PapalapticAfterblast")
ISSUE_NUMBER=30 # Get issue number from the input
# Create a properly formatted JSON string for the assignees array
assignees_json=$(printf '%s\n' "${users[@]}" | jq -R . | jq -s .)
echo "Assigning users: $assignees_json"
# Assign users to the issue using the correct endpoint
response=$(curl -s -o /dev/null -w "%{http_code}" -X POST \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{\"assignees\": [$(for user in "${users[@]}"; do echo "\"$user\","; done | sed 's/,$//')]}" \
-d "{\"assignees\": $assignees_json}" \
"https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUMBER/assignees")
if [ "$response" -eq 201 ]; then
Expand Down

0 comments on commit 8063947

Please sign in to comment.