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

Reduce number of otterdog-app comments #286

Open
mbarbero opened this issue Oct 4, 2024 · 4 comments
Open

Reduce number of otterdog-app comments #286

mbarbero opened this issue Oct 4, 2024 · 4 comments

Comments

@mbarbero
Copy link
Contributor

mbarbero commented Oct 4, 2024

Currently, when a PR is created, the otterdog-app generates at least five different comments (e.g., see this PR).

For some, if not all, of these messages, it would be better to update the initial comment rather than creating a new one.

The challenge lies in finding the correct comment to edit. The strategy I've used in the past is to begin the body of the comment with a header enclosed in comment tags (similar to HTML ones: <!-- -->). These won't be visible in the rendered comment, but the content returned by the API will include these strings. By standardizing the first line of the body with similar content, it becomes easier to identify the specific message to update.

@netomi
Copy link
Contributor

netomi commented Oct 4, 2024

This is already done, try to edit a comment from the bot and you will see the raw data.

In general, if the same type of comment is generated again, the now deprecated one of the same type is minimized.
The initial amount of comments is too much I agree, the reason the are separate is because separate tasks are being executed and can be requested via commands.

@mbarbero
Copy link
Contributor Author

mbarbero commented Oct 5, 2024

Sorry for the oversight. When you "separate tasks," I assume they are executed in parallel, which could introduce race conditions when editing the same comment, correct?

@netomi
Copy link
Contributor

netomi commented Oct 7, 2024

I fixed a bug where the check-sync comment was always added after a PR got updated. In order to reduce the noise this check is only executed if the last check is more than 1h old. The idea is that this check verifies that the config is in sync with the live settings.

@netomi
Copy link
Contributor

netomi commented Oct 7, 2024

these tasks are executed concurrently, we could change the logic to have less comments that are generated from the app and edit these comments rather than minimizing and creating new ones.

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