You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/actions/comment-resolved-issues/action.yml
+13-6Lines changed: 13 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ runs:
17
17
shell: bash
18
18
env:
19
19
GH_TOKEN: ${{ inputs.token }}
20
-
run: |
20
+
run: |
21
21
# Get the previous tag
22
22
PREVIOUS_TAG=$(git tag --sort=-version:refname | sed -n '2p')
23
23
CURRENT_TAG=$(git tag --sort=-version:refname | sed -n '1p')
@@ -46,7 +46,7 @@ runs:
46
46
47
47
# Get issue numbers from this PR
48
48
PR_ISSUES=$(gh pr view "$pr_number" --json body --jq '.body' | \
49
-
grep -o 'issues/[0-9]*' | \
49
+
grep -o 'issues/[0-9]+' | \
50
50
sed 's/issues\///')
51
51
echo " Found issues: $PR_ISSUES"
52
52
@@ -55,12 +55,19 @@ runs:
55
55
done
56
56
57
57
# 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
59
61
if [ -n "$issue_number" ]; then
60
62
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
62
64
echo "::error::Failed to comment on issue #$issue_number"
63
-
exit 1
65
+
FAILURES="$FAILURES #$issue_number"
64
66
fi
65
67
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"
0 commit comments