api/webhook.go
func webhookInfo(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	webhookName := r.URL.Query().Get(":name")
	webhook, err := servicemanager.Webhook.Find(webhookName)
	if err != nil {
		if err == eventTypes.ErrWebhookNotFound {
			w.WriteHeader(http.StatusNotFound)
		}
		return err
	}
	ctx := permission.Context(permTypes.CtxTeam, webhook.TeamOwner)
	if !permission.Check(t, permission.PermWebhookRead, ctx) {
		return permission.ErrUnauthorized
	}
	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(webhook)
}
func webhookInfo(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	webhookName := r.URL.Query().Get(":name")
	webhook, err := servicemanager.Webhook.Find(webhookName)
	if err != nil {
		if err == eventTypes.ErrWebhookNotFound {
			w.WriteHeader(http.StatusNotFound)
		}
		return err
	}
	ctx := permission.Context(permTypes.CtxTeam, webhook.TeamOwner)
	if !permission.Check(t, permission.PermWebhookRead, ctx) {
		return permission.ErrUnauthorized
	}
	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(webhook)
}
// title: webhook info
// path: /events/webhooks/{name}
// method: GET
// produce: application/json
// responses:
//   200: Get webhook
//   404: Not found
//   401: Unauthorized