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

Hide and un-hide comment based on test results #300

Open
TWiStErRob opened this issue Jun 4, 2022 · 6 comments
Open

Hide and un-hide comment based on test results #300

TWiStErRob opened this issue Jun 4, 2022 · 6 comments

Comments

@TWiStErRob
Copy link

Hey, I'm thinking about an enhancement. Right now as far as I understand the only way to enable comments is if it always creates a comment, and then recycles that comment (default behavior).

Normally when everything is fine, creating comments is noisy in the PR, especially when there are different types of tests executed (e.g. unit, screenshot record, screenshot verify, UI tests, integration tests).

You can see how quickly the green test result comments get longer than the actual PR contents (conversation, commits, etc.).

So the following behavior would be nice:

  • when tests pass, nothing is commented.
  • when tests fail, a comment is added with summary (as is now).
  • when tests are fixed on the same PR via new commits, the comment is updated, and also gets hidden.
  • when tests are broken on the same PR via new commits, the original comment gets updated and unhidden if exists, otherwise see "fail".
TWiStErRob added a commit to TWiStErRob/net.twisterrob.sun that referenced this issue Jun 4, 2022
…lt-action#300), also increase noise in check list by adding Gradle Build Scans
@TWiStErRob TWiStErRob changed the title Feature: comment_mode: smart_failure comment_mode: smart_failure Jun 4, 2022
@EnricoMi
Copy link
Owner

EnricoMi commented Jun 4, 2022

Agreed, duplicate of #41, to be fixed by #248.

@TWiStErRob
Copy link
Author

Nice! Shall we close this? The hiding part might be an extra scope to #41.

@EnricoMi
Copy link
Owner

EnricoMi commented Jun 4, 2022

This is a nice summary. I will leave this open for the hiding bit, which would be done separately. It is much easier and could be done first, so that good test results are posted as hidden comment, un-hidden on failure and re-hidden once fixed. Like it.

@TWiStErRob
Copy link
Author

TWiStErRob commented Jun 4, 2022

Don't create the hidden comment on success, that's still noise and takes up vertical space, also email notification might be sent.

@EnricoMi
Copy link
Owner

EnricoMi commented Jun 4, 2022

Yes, but that bit IS #41. Can be freely combined with this feature here.

@TWiStErRob
Copy link
Author

Huh 👏

@EnricoMi EnricoMi changed the title comment_mode: smart_failure Hide and un-hide comment based on test results Jun 15, 2022
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