This repository was archived by the owner on Jul 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Show count of new, fixed issues in PR statuses #61
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMMENT_BODY = '<img src="https://codeclimate.com/favicon.png" width="20" height="20" /> <b>Code Climate</b> has <a href="%s">analyzed this pull request</a>.' | ||
|
||
DETAILED_COMMENT_BODY = '<img src="https://codeclimate.com/favicon.png" width="20" height="20" /> <b>Code Climate</b> found <a href="%s">%s and %s</a>.' | ||
DETAILED_COMMENT_REGEX = %r{<b>Code Climate</b> found <a href=".*">.*issues.*</a>} |
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.
Looks like this regex can fail in the case of 1 fixed issue. I think the "s" needs to be optional
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.
good catch
|
TODO: remove changes to PR comments integration, since it's deprecated |
686756e
to
9fb0976
Compare
TODO: more "humanized" messaging - handle cases of 0 new and/or fixed issues |
9fb0976
to
bc65d67
Compare
Explicitly adds a dependency on activesupport (it was already an implicity dependency through the activemodel dependency). The new presenter uses active support for #pluralize and #to_sentence https://trello.com/c/f17uUGRd
bc65d67
to
be88d61
Compare
Ready for a re-review @codeclimate/review |
update_status("success", "Code Climate has analyzed this pull request.") | ||
update_status( | ||
"success", | ||
CC::Service::GitHubPullRequests::Presenter.new(@payload).success_message |
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.
👍
LGTM |
iancanderson
added a commit
that referenced
this pull request
Apr 2, 2015
Show count of new, fixed issues in PR statuses
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is a no-op unless the payload from the CC event includes both
fixed_issue_count
andnew_issue_count
keys.https://trello.com/c/f17uUGRd