feat: update bot comment when Jenkins finishes #259
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: this is a rough draft of a implementation of the "Edit Comment" feature described in #251. I haven't set up my machine to test the bot yet, so this code is completely untested at this point, but it reflects what I'm thinking.
I'm looking for comments on the flow instead of the code (since the code wasn't tested yet). The flow is as follow:
ncu-ci
to get a summary of changes, in markdown format<details>
tag.The result from this workflow will have minimum visual impact on Pull Requests while also adding a rich summary of failures, and will allow us to search for flaky tests easier (if a test failed on multiple PRs and we search for that test on the PRs tab, all PRs where the test failed will show up, making it easier to determine if a test is flaky or not).
There are some requirements for this workflow to work. We need to change our post-build-status-update on Jenkins to publish the build number as well. We also need to ensure ncu-ci can consume the credentials via environment variables (I don't think it can today). As a bonus, if ncu-ci could expose an API to get the markdown results of
ncu-ci
that'd be great, as we wouldn't need to spawn another process to do that, but I don't think it'll be possible in the near future.Update the bot comment on a PR when the corresponding Jenkins build
finishes. The updated comment will have the build status, and if the
build failed, it will have a summary of failures.
To identify a comment corresponding to a PR, we leave placeholders on
the comment as HTML commnets, so those placeholders can be replaced
later.
Signed-off-by: Matheus Marchini [email protected]