Skip to content

Commit 69adbfe

Browse files
Fix docs + 403
1 parent 63b2243 commit 69adbfe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

webhook/create_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func createHook(o *hookOptions) (string, func() error, error) {
6969
err = apiClient.Post(path, bytes.NewReader(reqBytes), &res)
7070
if err != nil {
7171
var apierr api.HTTPError
72-
if errors.As(err, &apierr) && apierr.StatusCode == http.StatusUnprocessableEntity {
72+
if errors.As(err, &apierr) && apierr.StatusCode == http.StatusForbidden {
7373
return "", nil, fmt.Errorf("you do not have access to this feature")
7474
}
7575
return "", nil, fmt.Errorf("error creating webhook: %w", err)

webhook/forward.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ func NewCmdForward(runF func(*hookOptions) error) *cobra.Command {
4343
# create a dev webhook for the 'issue_open' event in the monalisa/smile repo in GitHub running locally, and
4444
# forward payloads for the triggered event to http://localhost:9999/webhooks
4545
46-
$ gh webhooks forward --events=issues --repo=monalisa/smile --url="http://localhost:9999/webhooks"
47-
$ gh webhooks forward --events=issues --org=github --url="http://localhost:9999/webhooks"
46+
$ gh webhook forward --events=issues --repo=monalisa/smile --url="http://localhost:9999/webhooks"
47+
$ gh webhook forward --events=issues --org=github --url="http://localhost:9999/webhooks"
4848
`),
4949
RunE: func(*cobra.Command, []string) error {
5050
if opts.EventTypes == nil {

0 commit comments

Comments
 (0)