-
-
Notifications
You must be signed in to change notification settings - Fork 57
Option to update the PR comment #28
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
Conversation
const os = require('os'); | ||
const path = require('path'); | ||
|
||
function commentIdentifier(workflowName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is workflowName
needed by this function?
const updateGitHubComment = commentId => | ||
octokit.issues.updateComment({ | ||
repo: github.context.repo.repo, | ||
owner: github.context.repo.owner, | ||
comment_id: commentId, | ||
body, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this within the if check in line 64? That way its not unnecessary executed when updateComment is false
if (existingComment) { | ||
console.log('Update Comment ID: ' + existingComment.id); | ||
await updateGitHubComment(existingComment.id); | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are returning here, the failure handling in line 80 does not get executed. I am not sure why that was added in the first place. May be @zgosalvez can answer here. But if that is needed, we should not return here. Or perhaps move the failure handling and exception throwing code above this if block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@balaji-nordic I've proposed improvements in #42. The failure handling in line 80 is about checking if minimum coverage is satisfied. Comment should be created/updated either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a welcome change. I have been wanting this too. Just a few minor comments. I have not tested this though. I can try to test when I get some time.
Any updates on this @oacik? we would love to have it! |
In the meantime, @oacik since you got first dibs on this enhancement, would you mind incorporating the improvements/fixes to this PR from @bartosz347's PR #42? |
Hey @zgosalvez, I was out of the loop for a while but at first glance #42 seems to fix the problems of this PR already, I am ok with closing this PR and merging the #42 |
Moving to PR #42. Thank you. 🙏🏼 |
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.20.1 to 0.20.2. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](evanw/esbuild@v0.20.1...v0.20.2) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
New option to edit the existing comment in PR instead of adding a new comment on every commit.
This makes it clearer in the PR page.