From 5b18649375962929949585af6a817a90b38f77e5 Mon Sep 17 00:00:00 2001 From: Damien Coraboeuf Date: Sun, 28 Mar 2021 15:46:56 +0200 Subject: [PATCH] In a config is disabled, run the commands in NOP mode at client level --- client/ontrackGraphQLClient.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/ontrackGraphQLClient.go b/client/ontrackGraphQLClient.go index 337b9ee..6f08a65 100644 --- a/client/ontrackGraphQLClient.go +++ b/client/ontrackGraphQLClient.go @@ -11,6 +11,12 @@ import ( // GraphQLCall performs a GraphQL query/mutation to Ontrack func GraphQLCall(config *config.Config, query string, variables map[string]interface{}, data interface{}) error { + + // If config is disabled, skips the call + if config.Disabled { + return nil + } + body := map[string]interface{}{ "query": query, "variables": variables,