// Copyright 2021 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package github

import (
	
)

// GetHookConfig returns the webhook configuration for a GitHub App.
// The underlying transport must be authenticated as an app.
//
// GitHub API docs: https://docs.github.com/rest/apps/webhooks#get-a-webhook-configuration-for-an-app
//
//meta:operation GET /app/hook/config
func ( *AppsService) ( context.Context) (*HookConfig, *Response, error) {
	,  := .client.NewRequest("GET", "app/hook/config", nil)
	if  != nil {
		return nil, nil, 
	}

	 := new(HookConfig)
	,  := .client.Do(, , &)
	if  != nil {
		return nil, , 
	}

	return , , nil
}

// UpdateHookConfig updates the webhook configuration for a GitHub App.
// The underlying transport must be authenticated as an app.
//
// GitHub API docs: https://docs.github.com/rest/apps/webhooks#update-a-webhook-configuration-for-an-app
//
//meta:operation PATCH /app/hook/config
func ( *AppsService) ( context.Context,  *HookConfig) (*HookConfig, *Response, error) {
	,  := .client.NewRequest("PATCH", "app/hook/config", )
	if  != nil {
		return nil, nil, 
	}

	 := new(HookConfig)
	,  := .client.Do(, , )
	if  != nil {
		return nil, , 
	}

	return , , nil
}