Skip to content

Commit 5493cb6

Browse files
committed
address PR comments
1 parent b681505 commit 5493cb6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

github/orgs_hooks_configuration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
//
1515
// GitHub API docs: https://docs.github.com/en/rest/orgs/webhooks?apiVersion=2022-11-28#get-a-webhook-configuration-for-an-organization
1616
func (s *OrganizationsService) GetHookConfiguration(ctx context.Context, org string, id int64) (*HookConfig, *Response, error) {
17-
u := fmt.Sprintf("orgs/%v/hooks/%d/config", org, id)
17+
u := fmt.Sprintf("orgs/%v/hooks/%v/config", org, id)
1818
req, err := s.client.NewRequest("GET", u, nil)
1919
if err != nil {
2020
return nil, nil, err
@@ -33,7 +33,7 @@ func (s *OrganizationsService) GetHookConfiguration(ctx context.Context, org str
3333
//
3434
// GitHub API docs: https://docs.github.com/en/rest/orgs/webhooks?apiVersion=2022-11-28#update-a-webhook-configuration-for-an-organization
3535
func (s *OrganizationsService) EditHookConfiguration(ctx context.Context, org string, id int64, config *HookConfig) (*HookConfig, *Response, error) {
36-
u := fmt.Sprintf("orgs/%v/hooks/%d/config", org, id)
36+
u := fmt.Sprintf("orgs/%v/hooks/%v/config", org, id)
3737
req, err := s.client.NewRequest("PATCH", u, config)
3838
if err != nil {
3939
return nil, nil, err

github/repos_hooks_configuration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
//
1515
// GitHub API docs: https://docs.github.com/en/rest/webhooks/repo-config?apiVersion=2022-11-28#get-a-webhook-configuration-for-a-repository
1616
func (s *RepositoriesService) GetHookConfiguration(ctx context.Context, owner, repo string, id int64) (*HookConfig, *Response, error) {
17-
u := fmt.Sprintf("repos/%v/%v/hooks/%d/config", owner, repo, id)
17+
u := fmt.Sprintf("repos/%v/%v/hooks/%v/config", owner, repo, id)
1818
req, err := s.client.NewRequest("GET", u, nil)
1919
if err != nil {
2020
return nil, nil, err
@@ -33,7 +33,7 @@ func (s *RepositoriesService) GetHookConfiguration(ctx context.Context, owner, r
3333
//
3434
// GitHub API docs: https://docs.github.com/en/rest/webhooks/repo-config?apiVersion=2022-11-28#update-a-webhook-configuration-for-a-repository
3535
func (s *RepositoriesService) EditHookConfiguration(ctx context.Context, owner, repo string, id int64, config *HookConfig) (*HookConfig, *Response, error) {
36-
u := fmt.Sprintf("repos/%v/%v/hooks/%d/config", owner, repo, id)
36+
u := fmt.Sprintf("repos/%v/%v/hooks/%v/config", owner, repo, id)
3737
req, err := s.client.NewRequest("PATCH", u, config)
3838
if err != nil {
3939
return nil, nil, err

0 commit comments

Comments
 (0)