portainer/portainer

View on GitHub
api/http/handler/webhooks/webhook_execute.go

Summary

Maintainability
A
1 hr
Test Coverage

Method Handler.executeServiceWebhook has 7 return statements (exceeds 4 allowed).
Open

func (handler *Handler) executeServiceWebhook(
    w http.ResponseWriter,
    endpoint *portainer.Endpoint,
    resourceID string,
    registryID portainer.RegistryID,
Severity: Major
Found in api/http/handler/webhooks/webhook_execute.go - About 45 mins to fix

    Method Handler.executeServiceWebhook has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        w http.ResponseWriter,
        endpoint *portainer.Endpoint,
        resourceID string,
        registryID portainer.RegistryID,
        imageTag string,
    Severity: Minor
    Found in api/http/handler/webhooks/webhook_execute.go - About 35 mins to fix

      Method Handler.webhookExecute has 5 return statements (exceeds 4 allowed).
      Open

      func (handler *Handler) webhookExecute(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
      
          webhookToken, err := request.RetrieveRouteVariableValue(r, "token")
      
          if err != nil {
      Severity: Major
      Found in api/http/handler/webhooks/webhook_execute.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status