Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AhmedBaset
Copy link

@AhmedBaset AhmedBaset commented Dec 19, 2023

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
Copy link

hashicorp-cla commented Dec 19, 2023

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