def edit(*args)
      arguments(args, required: [:user, :repo, :branch]) do
        permit VALID_PROTECTION_PARAM_NAMES
      end

      put_request("/repos/#{arguments.user}/#{arguments.repo}/branches/#{arguments.branch}/protection", arguments.params)
    end
def edit(*args)
      arguments(args, required: [:user, :repo, :branch]) do
        permit VALID_PROTECTION_PARAM_NAMES
      end

      put_request("/repos/#{arguments.user}/#{arguments.repo}/branches/#{arguments.branch}/protection", arguments.params)
    end
Edit a branch protection

 Users with push access to the repository can edit a branch protection.

 @param [Hash] params
 @input params [String] :required_status_checks
   Required.
 @input params [String] :enforce_admins
   Required.
 @input params [String] :restrictions
   Required.
 @input params [String] :required_pull_request_reviews
   Required.
 Look to the branch protection API to see how to use these
 https://developer.github.com/v3/repos/branches/#update-branch-protection

 @example
   github = Github.new
   github.repos.branches.protections.edit 'user', 'repo', 'branch',
     required_pull_request_reviews: {dismiss_stale_reviews: false}

 @api public