Skip to content
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

Action does not update or remove the comment when PR has zero changes #19

Closed
madhusudhand opened this issue Aug 30, 2024 · 1 comment
Closed

Comments

@madhusudhand
Copy link
Member

When PR is updated with zero theme changes it fails to update the comment.

Steps:

  • Create a PR with a change to a theme and another file such as readme.md
  • Action adds a comment with one preview link
  • Now revert the theme change and update the PR (now PR has only change to readme.md)
  • Observe that action fails to update the comment.

Expectation:

Action should remove the comment when there are no theme changes, and if there is a previous comment in the PR.
Alternatively, it may also update the comment to remove all links and just say no theme changes

@vcanales
Copy link
Member

Thanks for the report, I've updated the action with a couple of improvements. #22

  • Better diffing: we will no longer see irrelevant changes being displayed because we now compare the branch HEAD with the base ref from which the branch was created instead of the base branch.
  • Added a delete step that removes the comment if no theme changes are detected.

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

No branches or pull requests

2 participants