File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change 87
87
88
88
# if redirect not already in file, add to string to add to PR description
89
89
if ! grep -q "$redirect" $REDIRECTS_FILE; then
90
- deleted_redirects+="$redirect,"
90
+ deleted_redirects+='<li>[<v>-*]: ${prefix}/${version}'"$old"'/ -> ${base}/${version}/</li>'
91
91
fi
92
92
done
93
-
94
- # cut trailing comma
95
- deleted_redirects="${deleted_redirects%,}"
96
93
97
94
echo "redirects=${deleted_redirects}" >> "$GITHUB_OUTPUT"
98
95
@@ -102,21 +99,9 @@ jobs:
102
99
RENAMED_REDIRECTS : ${{ steps.renamed-files.outputs.redirects }}
103
100
DELETED_REDIRECTS : ${{ steps.deleted-files.outputs.redirects }}
104
101
run : |
105
- # empty string that stays empty if there are no redirects to suggest
106
- redirect_html=""
107
-
108
- combined_redirect_string="${RENAMED_REDIRECTS},${DELETED_REDIRECTS}"
109
-
110
- for redirect in $combined_redirect_string; do
111
- if [[ ! -z "$redirect" ]]; then
112
- if [[ redirect_html="" ]]; then
113
- redirect_html="*Suggested redirects for moved/deleted files (replace <v> with earliest backport target version):*"
114
- fi
115
- redirect_html+="<li>[<v>-*]: $redirect</li>"
116
- fi
117
- done
102
+ combined_redirect_html="${RENAMED_REDIRECTS}${DELETED_REDIRECTS}"
118
103
119
- echo "redirect_html=${redirect_html }" >> "$GITHUB_OUTPUT"
104
+ echo "redirect_html=${combined_redirect_html }" >> "$GITHUB_OUTPUT"
120
105
121
106
- name : Update PR Description
122
107
uses : MongoCaleb/pr-description-action@4bdfe35b98f64532b419ad20b350a92546cd3aa1
You can’t perform that action at this time.
0 commit comments