File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -85,23 +85,26 @@ jobs:
85
85
show-progress : ' false'
86
86
- name : Assign PR creator to issue
87
87
run : |
88
+ set -e
89
+
88
90
# "gh issue edit" cannot be used - workaround found at https://github.com/cli/cli/issues/9620#issuecomment-2703135049
89
91
90
92
ASSIGNEES=$(gh api /repos/JabRef/jabref/issues/${{ steps.get_issue_number.outputs.ticketNumber }} --jq '[.assignees[].login]')
91
-
93
+
92
94
# Check if the user is already assigned
93
95
if echo "$ASSIGNEES" | jq -e '. | index("${{ github.event.pull_request.user.login }}")' >/dev/null; then
94
96
echo "User '${{ github.event.pull_request.user.login }}' is already an assignee. No update needed."
97
+ echo "Debug: $ASSIGNEES"
95
98
exit 0
96
99
fi
97
100
98
101
# Append the new assignee
99
102
UPDATED_ASSIGNEES=$(echo "$ASSIGNEES" | jq --arg new "${{ github.event.pull_request.user.login }}" '. + [$new]')
100
103
101
104
# Update issue with the new assignee list
105
+ echo "Updating issue #${{ steps.get_issue_number.outputs.ticketNumber }} updated with assignees: $UPDATED_ASSIGNEES..."
102
106
gh api -X PATCH /repos/JabRef/jabref/issues/${{ steps.get_issue_number.outputs.ticketNumber }} --input <(echo "{\"assignees\": $UPDATED_ASSIGNEES}")
103
107
104
- echo "Issue # ${{ steps.get_issue_number.outputs.ticketNumber }} updated with assignees: $UPDATED_ASSIGNEES"
105
108
env :
106
109
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
107
110
- name : Add label "📌 Pinned"
You can’t perform that action at this time.
0 commit comments