` for , hook := range hooks {
hookEvents, , err := git.Projects.ListHookWebhookEvents(projectID, hook.ID, nil)
if err != nil {
fmt.Printf("Error fetching hook events for hook %d: %v\n", hook.ID, err)
continue
}
for _, event := range hookEvents {
if event.Status == "failed" {
_, err := git.Projects.RedeliverHook(projectID, hook.ID, event.ID)
if err != nil {
fmt.Printf("Error retrying webhook for event %d: %v\n", event.ID, err)
} else {
fmt.Printf("Webhook retried for event %d\n", event.ID)
}
}
}
}`
ChatGPT gives the ListHookWebhookEvents method to query the list of events sent, and then retries those with a status of failure. However, I didn't find these two methods in the SDK. Is the SDK missing this method, or did GPT make it up?
` for , hook := range hooks { hookEvents, , err := git.Projects.ListHookWebhookEvents(projectID, hook.ID, nil) if err != nil { fmt.Printf("Error fetching hook events for hook %d: %v\n", hook.ID, err) continue }
ChatGPT gives the ListHookWebhookEvents method to query the list of events sent, and then retries those with a status of failure. However, I didn't find these two methods in the SDK. Is the SDK missing this method, or did GPT make it up?