Skip to content

Conversation

oacik
Copy link
Contributor

@oacik oacik commented Jul 20, 2022

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.

const os = require('os');
const path = require('path');

function commentIdentifier(workflowName) {

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?

Comment on lines +45 to +51
const updateGitHubComment = commentId =>
octokit.issues.updateComment({
repo: github.context.repo.repo,
owner: github.context.repo.owner,
comment_id: commentId,
body,
})

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
Copy link

@balaji-srin balaji-srin Aug 2, 2022

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.

Copy link
Contributor

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.

Copy link

@balaji-srin balaji-srin left a 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.

@andronat
Copy link

Any updates on this @oacik? we would love to have it!

@zgosalvez
Copy link
Owner

FYI, I've made a lot of merges today and would like to release PR #20 first then maybe merge #42 with this. Thanks!

@zgosalvez
Copy link
Owner

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?

@oacik
Copy link
Contributor Author

oacik commented Nov 27, 2022

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

@zgosalvez
Copy link
Owner

Moving to PR #42. Thank you. 🙏🏼

@zgosalvez zgosalvez closed this Nov 28, 2022
pavelsaman pushed a commit to pavelsaman/github-actions-report-lcov that referenced this pull request Mar 19, 2024
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>
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

Successfully merging this pull request may close these issues.

5 participants