File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -92,14 +92,29 @@ jobs:
92
92
93
93
echo "redirects=${deleted_redirects}" >> "$GITHUB_OUTPUT"
94
94
95
+ - name : Build Redirect HTML
96
+ id : build-redirect-html
97
+ env :
98
+ RENAMED_REDIRECTS : ${{ steps.renamed-files.outputs.redirects }}
99
+ DELETED_REDIRECTS : ${{ steps.deleted-files.outputs.redirects }}
100
+ run : |
101
+ redirect_html=''
102
+ combined_redirects="${RENAMED_REDIRECTS}${DELETED_REDIRECTS}"
103
+
104
+ if [ -n "$combined_redirects" ]; then
105
+ redirect_html+="*Suggested redirects for moved/deleted files (replace <v> with earliest backport target version):*\n$combined_redirects"
106
+ fi
107
+
108
+ echo -e "redirect_html=${redirect_html}" >> "$GITHUB_OUTPUT"
109
+
95
110
- name : Update PR Description
96
111
if : steps.renamed-files.outputs.redirects != '' || steps.deleted-files.outputs.redirects != ''
97
112
uses : MongoCaleb/pr-description-action@4bdfe35b98f64532b419ad20b350a92546cd3aa1
98
113
with :
99
114
regex : " - \\ [ \\ ] Did you add redirects\\ ?.*"
100
115
appendContentOnMatchOnly : false
101
116
regexFlags : is
102
- content : " - [ ] Did you add redirects?\n *Suggested redirects for moved/deleted files (replace <v> with earliest backport target version):* \n ${{ steps.renamed-files.outputs.redirects }}${{ steps.deleted-files .outputs.redirects }}\n "
117
+ content : " - [ ] Did you add redirects?\n ${{ steps.build-redirect-html .outputs.redirect_html }}"
103
118
token : ${{ secrets.GITHUB_TOKEN }}
104
119
105
120
- name : Check for duplicates in redirects file
You can’t perform that action at this time.
0 commit comments