From 58e83c42a3b954496b486c26891f7ad7f8cb658a Mon Sep 17 00:00:00 2001 From: Nirav Parikh Date: Mon, 27 Jun 2022 13:13:44 +0530 Subject: [PATCH] removed scheduling from codeql and fixed an alert --- .github/workflows/codeql.yml | 2 -- pkg/service/cluster.go | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5ba66a4..39a3c48 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -17,8 +17,6 @@ on: pull_request: # The branches below must be a subset of the branches above branches: [ "main" ] - schedule: - - cron: '30 16 * * 0' jobs: analyze: diff --git a/pkg/service/cluster.go b/pkg/service/cluster.go index eaf31f9..74e8c87 100644 --- a/pkg/service/cluster.go +++ b/pkg/service/cluster.go @@ -418,7 +418,11 @@ func (s *clusterService) prepareClusterResponse(ctx context.Context, clstr *infr ModifiedAt: timestamppb.New(c.ModifiedAt), } - sm, _ := strconv.Atoi(c.ShareMode) + smv, _ := strconv.ParseInt(c.ShareMode, 10, 32) + if err != nil { + _log.Infow("unable to convert value, ", err.Error()) + } + sm := int32(smv) var proxy infrav3.ProxyConfig if c.ProxyConfig != nil { json.Unmarshal(c.ProxyConfig, &proxy)