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
update failed pr message #76
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
874028a
use message from payload in error status update
8b644ab
add message key to tests with error state
49dda72
set default error message as a constant. remove 'while' from old mess…
67271c5
use default error message when no message is provided. don't fetch me…
9ec9161
update tests
c239253
remove detail url from params if the status is error
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
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.
At first glance, I don't love this. Why not just not include the target_url in the original payload. I don't think this class should be responsible for "overriding" the payload in this way. /c @gordondiggs @abaldwinhubter @pbrisbin
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.
Typo. /cc @ABaldwinHunter
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.
@brynary apologies, just saw your note! I believe the thought was that removing the
details_url
would remove thedetails
link from PRs that error out.What's constructed in this
update_status
method doesn't match the original payload perfectly, and without adding in a conditional, it might set thetarget_url
tonil
when@payload["details_url"]
gets left out.That said, I think this is the place in
finalizer
wherepayload
gets created and sent:We could perhaps make a change there.
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.
Yeah, the goal of removing the link in errored PRs makes sense (temporarily). I was only commenting on the implementation.
It seems like we could either change the payload that is sent to not include the URL (which would require a change elsewhere) or remove it here. What are your thoughts on how it should work?
—Bryan Helmkamp, Founder, Code Climate
bryan@brynary.com / 646-379-1810 / @brynary
Typed with thumbs.
On Mon, Jul 6, 2015 at 4:44 PM, Ashley Baldwin-Hunter
notifications@github.com wrote:
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.
Agreed that change would be better in finalizer.
I would test if this matters. If it does, I'd rather that conditional than the one you have.
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.
@pbrisbin @brynary Hmm. It seems to me that right now, the
codeclimate-services
entity is not just getting a payload and relaying it, but making some additional calculations - e.g. formatting messages based on number of issues fixed, adding acontext: 'codeclimate'
to params passed to http request.However, we recently updated finalizer to also do some analysis, including checking whether errored state is due to worker_version incompatibility and adding a unique message to payload, if that's the case.
On one hand, it seems nice for
finalizer
(or whatever other entity) to just be able to send a bunch of information tocodeclimate-services
github_PR and have cc-services know what to do with it.On the other hand, it seems nice to have cc-services not know too much about how the stuff it's handling gets calculated - it just knows it needs to send message x to place y.
So, yeah. Agree. Ultimately I favor minimizing analysis in cc-services, which would mean not having it read
state
to decide whether to adddetails_url
or not.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.
@ABaldwinHunter OK, can you please address this at your convenience?