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

Commit 93d3dc8

Browse files
committed
Add a simple handler for the test event
- Test that we can access the GH API with the configured token
1 parent e583b97 commit 93d3dc8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/cc/services/github_pull_requests.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ class Config < CC::Service::Config
2020
BODY_REGEX = %r{<b>Code Climate</b> has <a href=".*">analyzed this pull request</a>}
2121
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>.'
2222

23+
# Just make sure we can access GH using the configured token. Without
24+
# additional information (github-slug, PR number, etc) we can't test much
25+
# else.
26+
def receive_test
27+
setup_http
28+
29+
http_get("#{BASE_URL}")
30+
31+
nil
32+
end
33+
2334
def receive_pull_request
2435
setup_http
2536

0 commit comments

Comments
 (0)