Skip to content

Commit 575361c

Browse files
author
Dan O'Brien
authored
update Incident List query (#85)
* add more description for status, remove 'and' in query * remove custom status
1 parent 1126344 commit 575361c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/incident.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
type ListIncidentsParams struct {
1313
Limit int `json:"limit" jsonschema:"description=The maximum number of incidents to return"`
1414
Drill bool `json:"drill" jsonschema:"description=Whether to include drill incidents"`
15-
Status string `json:"status" jsonschema:"description=The status of the incidents to include"`
15+
Status string `json:"status" jsonschema:"description=The status of the incidents to include. Valid values: 'active', 'resolved'"`
1616
}
1717

1818
func listIncidents(ctx context.Context, args ListIncidentsParams) (*incident.QueryIncidentPreviewsResponse, error) {
@@ -23,7 +23,7 @@ func listIncidents(ctx context.Context, args ListIncidentsParams) (*incident.Que
2323
query = "isdrill:false"
2424
}
2525
if args.Status != "" {
26-
query += fmt.Sprintf(" and status:%s", args.Status)
26+
query += fmt.Sprintf(" status:%s", args.Status)
2727
}
2828
incidents, err := is.QueryIncidentPreviews(ctx, incident.QueryIncidentPreviewsRequest{
2929
Query: incident.IncidentPreviewsQuery{

0 commit comments

Comments
 (0)