diff --git a/reviewboard/hostingsvcs/github.py b/reviewboard/hostingsvcs/github.py
index bcf8d46195660a6e5ae53fc94e63973eb54abf3d..70b649d5c614be8d7d1a7f04d5afd4340010143c 100644
--- a/reviewboard/hostingsvcs/github.py
+++ b/reviewboard/hostingsvcs/github.py
@@ -781,8 +781,15 @@ def post_receive_hook_close_submitted(request, local_site_name=None,
                                       repository_id=None,
                                       hosting_service_id=None):
     """Closes review requests as submitted automatically after a push."""
-    if request.META.get('HTTP_X_GITHUB_EVENT') != 'push':
-        return HttpResponseBadRequest('Only "push" events are supported.')
+    hook_event = request.META.get('HTTP_X_GITHUB_EVENT')
+
+    if hook_event == 'ping':
+        # GitHub is checking that this hook is valid, so accept the request
+        # and return.
+        return HttpResponse()
+    elif hook_event != 'push':
+        return HttpResponseBadRequest(
+            'Only "ping" and "push" events are supported.')
 
     repository = get_repository_for_hook(repository_id, hosting_service_id,
                                          local_site_name)
@@ -791,7 +798,13 @@ def post_receive_hook_close_submitted(request, local_site_name=None,
     m = hmac.new(bytes(repository.get_or_create_hooks_uuid()))
     m.update(request.body)
 
-    if m.hexdigest() != request.META.get('HTTP_X_HUB_SIGNATURE'):
+    sig_parts = request.META.get('HTTP_X_HUB_SIGNATURE').split('=')
+
+    if sig_parts[0] != 'sha1' or len(sig_parts) != 2:
+        # We don't know what this is.
+        return HttpResponseBadRequest('Unsupported HTTP_X_HUB_SIGNATURE')
+
+    if m.hexdigest() != sig_parts[1]:
         return HttpResponseBadRequest('Bad signature.')
 
     try:
diff --git a/reviewboard/hostingsvcs/tests.py b/reviewboard/hostingsvcs/tests.py
index 24096b3f21303c9475a783ccc7ab60a1327aa9f4..1a6ee1d8090e394688be511f4ac7e7db75f21969 100644
--- a/reviewboard/hostingsvcs/tests.py
+++ b/reviewboard/hostingsvcs/tests.py
@@ -1472,6 +1472,36 @@ class GitHubTests(ServiceTests):
             LocalSite.objects.get(name=self.local_site_name))
 
     @add_fixtures(['test_users', 'test_scmtools'])
+    def test_close_submitted_hook_ping(self):
+        """Testing GitHub close_submitted hook ping"""
+        account = self._get_hosting_account()
+        account.save()
+
+        repository = self.create_repository(hosting_account=account)
+
+        review_request = self.create_review_request(repository=repository,
+                                                    publish=True)
+        self.assertTrue(review_request.public)
+        self.assertEqual(review_request.status, review_request.PENDING_REVIEW)
+
+        url = local_site_reverse(
+            'github-hooks-close-submitted',
+            kwargs={
+                'repository_id': repository.pk,
+                'hosting_service_id': 'github',
+            })
+
+        response = self._post_commit_hook_payload(
+            url, review_request, repository.get_or_create_hooks_uuid(),
+            event='ping')
+        self.assertEqual(response.status_code, 200)
+
+        review_request = ReviewRequest.objects.get(pk=review_request.pk)
+        self.assertTrue(review_request.public)
+        self.assertEqual(review_request.status, review_request.PENDING_REVIEW)
+        self.assertEqual(review_request.changedescs.count(), 0)
+
+    @add_fixtures(['test_users', 'test_scmtools'])
     def test_close_submitted_hook_with_invalid_repo(self):
         """Testing GitHub close_submitted hook with invalid repository"""
         repository = self.create_repository()
@@ -1670,7 +1700,7 @@ class GitHubTests(ServiceTests):
             payload,
             content_type='application/json',
             HTTP_X_GITHUB_EVENT=event,
-            HTTP_X_HUB_SIGNATURE=m.hexdigest())
+            HTTP_X_HUB_SIGNATURE='sha1=%s' % m.hexdigest())
 
     def _test_check_repository(self, expected_user='myuser', **kwargs):
         def _http_get(service, url, *args, **kwargs):
