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

scm/github: filter issues that belongs to PR diff #9

Merged
merged 2 commits into from
Apr 13, 2022
Merged

Conversation

herlon214
Copy link
Owner

This should fix the issue #8

@adenisonafifi
Copy link

Thank you for following up on this so quickly!

@herlon214
Copy link
Owner Author

herlon214 commented Apr 13, 2022

@adenisonafifi no problem, I was adding tests to be sure it won't break. Worth a star ⭐ haha
I'm gonna release a new version

@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #9 (cefe2c7) into main (f580f7d) will decrease coverage by 0.11%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##             main       #9      +/-   ##
==========================================
- Coverage   74.04%   73.92%   -0.12%     
==========================================
  Files           4        4              
  Lines         235      257      +22     
==========================================
+ Hits          174      190      +16     
- Misses         42       46       +4     
- Partials       19       21       +2     
Impacted Files Coverage Δ
pkg/scm/github.go 80.18% <71.42%> (-1.96%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f580f7d...cefe2c7. Read the comment docs.

@herlon214 herlon214 merged commit 3bbc48f into main Apr 13, 2022
@herlon214 herlon214 deleted the fix/diff-issue branch April 13, 2022 23:31
@herlon214
Copy link
Owner Author

}

if len(comments) == 0 {
return errors.New("failed to find relevant issues")
}

body := fmt.Sprintf(`:wave: Hey, I added %d comments about your changes, please take a look :slightly_smiling_face:`, len(issues))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@herlon214 I forgot to update the I added %d comments about your changes to use len(comments) as now the len(issues) >= len(comments)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed on v0.5.1, thanks @adenisonafifi

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.

2 participants