Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 874028a

Browse files
author
ABaldwinHunter
committed
use message from payload in error status update
1 parent a09da57 commit 874028a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/cc/services/github_pull_requests.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class Config < CC::Service::Config
2121
BASE_URL = "https://api.github.com"
2222
BODY_REGEX = %r{<b>Code Climate</b> has <a href=".*">analyzed this pull request</a>}
2323
COMMENT_BODY = '<img src="https://codeclimate.com/favicon.png" width="20" height="20" />&nbsp;<b>Code Climate</b> has <a href="%s">analyzed this pull request</a>.'
24-
2524
# Just make sure we can access GH using the configured token. Without
2625
# additional information (github-slug, PR number, etc) we can't test much
2726
# else.
@@ -87,8 +86,7 @@ def presenter
8786
def update_status_error
8887
update_status(
8988
"error",
90-
"Code Climate encountered an error while attempting to analyze this " +
91-
"pull request."
89+
message
9290
)
9391
end
9492

@@ -194,6 +192,10 @@ def commit_sha
194192
@payload.fetch("commit_sha")
195193
end
196194

195+
def message
196+
@payload.fetch("message")
197+
end
198+
197199
def number
198200
@payload.fetch("number")
199201
end

0 commit comments

Comments
 (0)