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

[FEATURE] Add ability to delete and re-create current comment #159

Closed
ViacheslavKudinov opened this issue Dec 1, 2022 · 4 comments · Fixed by #170
Closed

[FEATURE] Add ability to delete and re-create current comment #159

ViacheslavKudinov opened this issue Dec 1, 2022 · 4 comments · Fixed by #170

Comments

@ViacheslavKudinov
Copy link

ViacheslavKudinov commented Dec 1, 2022

Hello,
it will be good if possible to add the behaviour when the comment can be not just replaced, but removed and created again.

Sometimes with long commit history in feature branch it is not obvious is comment actual if one is somewhere on the top.
If we have ability to "move" comment to the last commit which "triggered" comment update it probably can be a little bit more obvious.

Any feedback is appreciated.

@thollander
Copy link
Owner

Released in v2.1.0

@ViacheslavKudinov
Copy link
Author

Wow!
Thanks @thollander

@ViacheslavKudinov
Copy link
Author

Hello @thollander
Im trying this version but I see it just creates new comment and do not delete previous one.
Step looks like:

      - name: "Comment PR"
        uses: thollander/actions-comment-pull-request@604a0da6197348d9605c82aa7dcc7f0b5d7d6344 # tag v2.1.0
        if: always()
        with:
          message: |
            ## :microscope: Conftest test on ${{ matrix.folder }}
            ${{ env.STATUS }}
            ```shell
            ${{ steps.result.outputs.RESULT }}
            ```
          pr_number: ${{github.event.number}}
          mode: "recreate"

Real comment:

🔬 Conftest test on organization

✅ All tests PASSED !

30 tests, 30 passed, 0 warnings, 0 failures, 0 exceptions

How does it identify which comment to delete?

Previously to update comment I used version with comment_includes input and it was a filter to find comment.

Do I do anything wrong now?

@ViacheslavKudinov
Copy link
Author

The input comment_tag: Conftest test on ${{ matrix.folder }} seems helped.

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 a pull request may close this issue.

2 participants