PATCH /repos/:owner/:repo/hooks/:id

        :param hook_id: Id of the hook.
        :param name:  The name of the service that is being called.
        :param config: A Hash containing key/value pairs to provide settings
                       for this hook.

def editHook(self, repo_user, repo_name, hook_id, name, config,
            events=None, add_events=None, remove_events=None, active=None):
        """
        PATCH /repos/:owner/:repo/hooks/:id

        :param hook_id: Id of the hook.
        :param name:  The name of the service that is being called.
        :param config: A Hash containing key/value pairs to provide settings
                       for this hook.
        """
        post = dict(
                name=name,
                config=config,
                )
        if events is not None:
            post['events'] = events

        if add_events is not None:
            post['add_events'] = add_events

        if remove_events is not None:
            post['remove_events'] = remove_events

        if active is not None:
            post['active'] = active

        return self.api.makeRequest(
            ['repos', repo_user, repo_name, 'hooks', str(hook_id)],
            method='PATCH',
            post=post,
            )