File tree Expand file tree Collapse file tree 3 files changed +9
-26
lines changed
Expand file tree Collapse file tree 3 files changed +9
-26
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' nextjs-bundle-analysis ' : patch
3+ ---
4+
5+ Update template to use [ sticky-pull-request-comment] ( https://github.com/marocchino/sticky-pull-request-comment )
Original file line number Diff line number Diff line change @@ -192,10 +192,6 @@ if (hasNoChanges) {
192192 output += 'This PR introduced no changes to the JavaScript bundle! 🙌'
193193}
194194
195- // we add this tag so that our action can be able to easily and consistently find the
196- // right comment to edit as more commits are pushed.
197- output += `<!-- __NEXTJS_BUNDLE_${ PACKAGE_NAME } -->`
198-
199195// however, if ignoreIfEmpty is true, set output to an empty string
200196if ( hasNoChanges && SKIP_COMMENT_IF_EMPTY ) {
201197 output = ''
Original file line number Diff line number Diff line change @@ -104,26 +104,8 @@ jobs:
104104 echo "$(cat .next/analyze/__bundle_analysis_comment.txt)" >> $GITHUB_OUTPUT
105105 echo EOF >> $GITHUB_OUTPUT
106106
107- - name : Find Comment
108- uses : peter-evans/find-comment@v2
109- if : success() && github.event.number
110- id : fc
111- with :
112- issue-number : ${{ github.event.number }}
113- body-includes : ' <!-- __NEXTJS_BUNDLE -->'
114-
115- - name : Create Comment
116- uses : peter-evans/create-or-update-comment@v2
117- if : success() && github.event.number && steps.fc.outputs.comment-id == 0
118- with :
119- issue-number : ${{ github.event.number }}
120- body : ${{ steps.get-comment-body.outputs.body }}
121-
122- - name : Update Comment
123- uses : peter-evans/create-or-update-comment@v2
124- if : success() && github.event.number && steps.fc.outputs.comment-id != 0
107+ - name : Comment
108+ uses : marocchino/sticky-pull-request-comment@v2
125109 with :
126- issue-number : ${{ github.event.number }}
127- body : ${{ steps.get-comment-body.outputs.body }}
128- comment-id : ${{ steps.fc.outputs.comment-id }}
129- edit-mode : replace
110+ header : next-touched-pages
111+ message : ${{ steps.get-comment-body.outputs.body }}
You can’t perform that action at this time.
0 commit comments