old_contents: import json
  
  from flask import Blueprint, request, abort, g
  
  from mod_deploy.controllers import request_from_github, is_valid_signature
  
  mod_ci = Blueprint('ci', __name__)
  
  
  @mod_ci.route('/start-ci', methods=['GET', 'POST'])
  @request_from_github()
  def start_ci():
      if request.method != 'POST':
          return 'OK'
      else:
          abort_code = 418
  
          event = request.headers.get('X-GitHub-Event')
          if event == "ping":
              return json.dumps({'msg': 'Hi!'})
  
          x_hub_signature = request.headers.get('X-Hub-Signature')
          if not is_valid_signature(x_hub_signature, request.data,
                                    g.deploy_key):
              g.log.warning('CI signature failed: %s' % x_hub_signature)
              abort(abort_code)
  
          payload = request.get_json()
          if payload is None:
              g.log.warning('CI payload is empty: %s' % payload)
              abort(abort_code)
  
          return json.dumps({'msg': 'EOL'})
  
new_contents: import json
  
  from flask import Blueprint, request, abort, g
  
  from mod_deploy.controllers import request_from_github, is_valid_signature
  
  mod_ci = Blueprint('ci', __name__)
  
  
  @mod_ci.route('/start-ci', methods=['GET', 'POST'])
  @request_from_github()
  def start_ci():
      if request.method != 'POST':
          return 'OK'
      else:
          abort_code = 418
  
          event = request.headers.get('X-GitHub-Event')
          if event == "ping":
              return json.dumps({'msg': 'Hi!'})
  
          x_hub_signature = request.headers.get('X-Hub-Signature')
          if not is_valid_signature(x_hub_signature, request.data,
                                    g.ci_key):
              g.log.warning('CI signature failed: %s' % x_hub_signature)
              abort(abort_code)
  
          payload = request.get_json()
          if payload is None:
              g.log.warning('CI payload is empty: %s' % payload)
              abort(abort_code)
  
          return json.dumps({'msg': 'EOL'})
  
subject: Fix wrong key