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

Add optional HidePreviousComments option which defaults to false #25

Open
trivikr opened this issue Mar 16, 2020 · 5 comments
Open

Add optional HidePreviousComments option which defaults to false #25

trivikr opened this issue Mar 16, 2020 · 5 comments

Comments

@trivikr
Copy link

trivikr commented Mar 16, 2020

Is your feature request related to a problem? Please describe.
github-codebuild-logs posts multiple comments based on how many times CodeBuild was run for the PR, which depends on how many times additional pushes were done to PR branch after the PR was posted. Example aws/aws-sdk-js-v3#824

Describe the solution you'd like
Add optional HidePreviousComments option which is false by default. When true, it will hide previously posted PR comments as Outdated before posting a new one.

Describe alternatives you've considered

@trivikr
Copy link
Author

trivikr commented Jan 5, 2021

The option DeletePreviousComments was added in #21

@trivikr
Copy link
Author

trivikr commented Jan 5, 2021

PyGitHub revision 34d097ce doesn't have API to hide comment in IssueComment.
Docs: https://pygithub.readthedocs.io/en/latest/github_objects/IssueComment.html

@trivikr
Copy link
Author

trivikr commented Jan 5, 2021

GitHub REST API v3 doesn't have an option to hide or minimize comment.

Alternative solution is to update comment and collapse the comment content as follows:


Outdated AWS CodeBuild CI Report

AWS CodeBuild CI Report

  • CodeBuild project: PROJECT_NAME
  • Commit ID: COMMIT_ID
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository


Screenshot

Screen Shot 2021-01-05 at 1 31 05 PM

Docs:

@trivikr
Copy link
Author

trivikr commented Jan 5, 2021

The GraphQL API provides minimizeComment option under Mutations.
Docs: https://docs.github.com/en/free-pro-team@latest/graphql/reference/mutations#minimizecomment

Refs: isaacs/github#1480

I think this project should be good with DeletePreviousComments support, and this request can be closed.

@jlhood WDYT?

@PatMyron
Copy link

PatMyron commented May 7, 2023

update comment

Instead of updating previous comments while still posting new comments, it's cleaner to just keep updating the same comment without posting new comments. With comment edit history easily accessible on Github, that balances clean threads with arbitrarily large numbers of previous reports

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