From 9a18fbb7e7251588cf38c758e128efc8139497aa Mon Sep 17 00:00:00 2001 From: fjerlov-cs <158591046+fjerlov-cs@users.noreply.github.com> Date: Fri, 12 Jul 2024 12:52:45 +0200 Subject: [PATCH] Schedules searches - Small fix for omitting empty fields to the exported yaml file (#168) --- api/internal/humiographql/scheduled-search.go | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/api/internal/humiographql/scheduled-search.go b/api/internal/humiographql/scheduled-search.go index 5577f77..7217639 100644 --- a/api/internal/humiographql/scheduled-search.go +++ b/api/internal/humiographql/scheduled-search.go @@ -3,21 +3,20 @@ package humiographql import graphql "github.com/cli/shurcooL-graphql" type ScheduledSearch struct { - ID graphql.String `json:"id"` - Name graphql.String `json:"name"` - Description graphql.String `json:"description,omitempty"` - QueryString graphql.String `json:"queryString"` - Start graphql.String `json:"start"` - End graphql.String `json:"end"` - TimeZone graphql.String `json:"timezone"` - Schedule graphql.String `json:"schedule"` - BackfillLimit graphql.Int `json:"backfillLimit"` - Enabled graphql.Boolean `json:"enabled"` - ActionsV2 []Action `json:"actionsV2"` - RunAsUser User `json:"runAsUser,omitempty"` - TimeOfNextPlannedExecution Long `json:"timeOfNextPlannedExecution"` - Labels []graphql.String `json:"labels"` - QueryOwnership QueryOwnership `json:"queryOwnership"` + ID graphql.String `graphql:"id"` + Name graphql.String `graphql:"name"` + Description graphql.String `graphql:"description"` + QueryString graphql.String `graphql:"queryString"` + Start graphql.String `graphql:"start"` + End graphql.String `graphql:"end"` + TimeZone graphql.String `graphql:"timeZone"` + Schedule graphql.String `graphql:"schedule"` + BackfillLimit graphql.Int `graphql:"backfillLimit"` + Enabled graphql.Boolean `graphql:"enabled"` + ActionsV2 []Action `graphql:"actionsV2"` + RunAsUser User `graphql:"runAsUser"` + Labels []graphql.String `graphql:"labels"` + QueryOwnership QueryOwnership `graphql:"queryOwnership"` } type CreateScheduledSearch struct {