Skip to content

Commit 3f94355

Browse files
committed
More debug
1 parent a061bf8 commit 3f94355

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/on-pr-opened.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,26 @@ jobs:
8585
show-progress: 'false'
8686
- name: Assign PR creator to issue
8787
run: |
88+
set -e
89+
8890
# "gh issue edit" cannot be used - workaround found at https://github.com/cli/cli/issues/9620#issuecomment-2703135049
8991
9092
ASSIGNEES=$(gh api /repos/JabRef/jabref/issues/${{ steps.get_issue_number.outputs.ticketNumber }} --jq '[.assignees[].login]')
91-
93+
9294
# Check if the user is already assigned
9395
if echo "$ASSIGNEES" | jq -e '. | index("${{ github.event.pull_request.user.login }}")' >/dev/null; then
9496
echo "User '${{ github.event.pull_request.user.login }}' is already an assignee. No update needed."
97+
echo "Debug: $ASSIGNEES"
9598
exit 0
9699
fi
97100
98101
# Append the new assignee
99102
UPDATED_ASSIGNEES=$(echo "$ASSIGNEES" | jq --arg new "${{ github.event.pull_request.user.login }}" '. + [$new]')
100103
101104
# Update issue with the new assignee list
105+
echo "Updating issue #${{ steps.get_issue_number.outputs.ticketNumber }} updated with assignees: $UPDATED_ASSIGNEES..."
102106
gh api -X PATCH /repos/JabRef/jabref/issues/${{ steps.get_issue_number.outputs.ticketNumber }} --input <(echo "{\"assignees\": $UPDATED_ASSIGNEES}")
103107
104-
echo "Issue #${{ steps.get_issue_number.outputs.ticketNumber }} updated with assignees: $UPDATED_ASSIGNEES"
105108
env:
106109
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107110
- name: Add label "📌 Pinned"

0 commit comments

Comments
 (0)