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

Warning on hiding already hidden comment #1082

Open
richja opened this issue Aug 28, 2023 · 1 comment
Open

Warning on hiding already hidden comment #1082

richja opened this issue Aug 28, 2023 · 1 comment

Comments

@richja
Copy link

richja commented Aug 28, 2023

Similar to #559, when using hide: true and comment is already hidden, I am getting a warning: Comment body cannot be blank

Run marocchino/sticky-pull-request-comment@v2
  with:
    hide: true
    hide_classify: RESOLVED
    header: ***
    append: false
    recreate: false
    delete: false
    only_create: false
    only_update: false
    hide_details: false
    hide_and_recreate: false
    ignore_empty: false
    skip_unchanged: false
    follow_symbolic_links: false
    GITHUB_TOKEN: ***
  env:
    URL: https://api.github.com/repos/***/issues/564/comments
Warning: Comment body cannot be blank

Warning doesn't show up when a comment is not hidden yet.

@fregante
Copy link

fregante commented Feb 28, 2024

In my case, the comment isn't hidden at run time, I get the warning, and it doesn't get hidden by the end of the action run. It seems that hide: true as documented in the readme is broken:

https://github.com/marocchino/sticky-pull-request-comment/tree/v2/?tab=readme-ov-file#hide-previous-comment

I'm using

      - if: steps.stats.outputs.changes <= 1000
        uses: marocchino/sticky-pull-request-comment@v2
        with:
          header: lockfile # Unique identifier for the comment
          hide: true
      - if: steps.stats.outputs.changes > 1000
        uses: marocchino/sticky-pull-request-comment@v2
        with:
          header: lockfile # Unique identifier for the comment
          recreate: true
          message: |
            ## ⚠️ Large diff for package-lock.json

Live example https://togithub.com/pixiebrix/pixiebrix-extension/pull/7734#issuecomment-1968463512
Log (for the next 30 days) https://github.com/pixiebrix/pixiebrix-extension/actions/runs/8077604169/job/22068226398?pr=7734

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