Skip to content

Commit a60f832

Browse files
committed
feedback
1 parent 9bc808b commit a60f832

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/actions/comment-resolved-issues/action.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
shell: bash
1818
env:
1919
GH_TOKEN: ${{ inputs.token }}
20-
run: |
20+
run: |
2121
# Get the previous tag
2222
PREVIOUS_TAG=$(git tag --sort=-version:refname | sed -n '2p')
2323
CURRENT_TAG=$(git tag --sort=-version:refname | sed -n '1p')
@@ -46,7 +46,7 @@ runs:
4646
4747
# Get issue numbers from this PR
4848
PR_ISSUES=$(gh pr view "$pr_number" --json body --jq '.body' | \
49-
grep -o 'issues/[0-9]*' | \
49+
grep -o 'issues/[0-9]+' | \
5050
sed 's/issues\///')
5151
echo " Found issues: $PR_ISSUES"
5252
@@ -55,12 +55,19 @@ runs:
5555
done
5656
5757
# Comment on each issue found
58-
echo "$ISSUE_NUMBERS" | tr ' ' '\n' | while read -r issue_number; do
58+
FAILURES=""
59+
60+
while read -r issue_number; do
5961
if [ -n "$issue_number" ]; then
6062
echo "Commenting on issue #$issue_number"
61-
if ! gh issue comment "$issue_number" --body "A change related to this issue was included in release: $CURRENT_TAG"; then
63+
if ! gh issue comment "$issue_number" --body "A change related to this issue was included in [release **$CURRENT_TAG**](https://github.com/${{ github.repository }}/releases/tag/$CURRENT_TAG)."; then
6264
echo "::error::Failed to comment on issue #$issue_number"
63-
exit 1
65+
FAILURES="$FAILURES #$issue_number"
6466
fi
6567
fi
66-
done
68+
done < <(echo "$ISSUE_NUMBERS" | tr ' ' '\n')
69+
70+
if [ -n "$FAILURES" ]; then
71+
echo "::error::Failed to update the following issue(s):$FAILURES"
72+
exit 1
73+
fi

0 commit comments

Comments
 (0)