Skip to content

Fix: update the existing comment instead of creating a new one - #86

Open
AhmedBaset wants to merge 1 commit into
hashicorp:mainfrom
AhmedBaset:patch-1
Open

Fix: update the existing comment instead of creating a new one#86
AhmedBaset wants to merge 1 commit into
hashicorp:mainfrom
AhmedBaset:patch-1

Conversation

@AhmedBaset

@AhmedBaset AhmedBaset commented Dec 19, 2023

Copy link
Copy Markdown

When creating a comment we put an HTML comment inside, to use later to decide whether to update the existing comment or create a new one with this template <!-- __NEXTJS_BUNDLE_${PACKAGE_NAME} -->.

// we add this tag so that our action can be able to easily and consistently find the
// right comment to edit as more commits are pushed.
output += `<!-- __NEXTJS_BUNDLE_${PACKAGE_NAME} -->`

In the workflow we search for the comment but without the ${PACKAGE_NAME.

- name: Find Comment
uses: peter-evans/find-comment@v2
if: success() && github.event.number
id: fc
with:
issue-number: ${{ github.event.number }}
body-includes: '<!-- __NEXTJS_BUNDLE -->'

This PR fixes the mismatch between the two

- body-includes: '<!-- __NEXTJS_BUNDLE_ -->'
+ body-includes: '<!-- __NEXTJS_BUNDLE'

@hashicorp-cla

hashicorp-cla commented Dec 19, 2023

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants