You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
suggestions.append(f"Filtered by validity: {', '.join(val_names)}")
86
+
87
+
# If no results, suggest how to get more
88
+
ifincidents_count==0andsuggestions:
89
+
suggestions.append("No incidents matched the applied filters. Try with mine=False, exclude_tags=[], or different status/severity/validity filters to see all incidents.")
90
+
91
+
return"\n".join(suggestions) ifsuggestionselse""
92
+
93
+
36
94
classListRepoIncidentsParams(BaseModel):
37
95
"""Parameters for listing repository incidents."""
38
96
repository_name: str|None=Field(
@@ -43,6 +101,12 @@ class ListRepoIncidentsParams(BaseModel):
43
101
default=None,
44
102
description="The GitGuardian source ID to filter by. Can be obtained using find_current_source_id. If provided, repository_name is not required."
45
103
)
104
+
ordering: str|None=Field(default=None, description="Sort field (e.g., 'date', '-date' for descending)")
105
+
per_page: int=Field(default=20, description="Number of results per page (default: 20, min: 1, max: 100)")
106
+
cursor: str|None=Field(default=None, description="Pagination cursor for fetching next page of results")
107
+
get_all: bool=Field(default=False, description="If True, fetch all results using cursor-based pagination")
108
+
109
+
# Filters
46
110
from_date: str|None=Field(
47
111
default=None, description="Filter occurrences created after this date (ISO format: YYYY-MM-DD)"
48
112
)
@@ -56,10 +120,6 @@ class ListRepoIncidentsParams(BaseModel):
56
120
description="Exclude incidents with these tag names."
57
121
)
58
122
status: list[str] |None=Field(default=DEFAULT_STATUSES, description="Filter by status (list of status names)")
59
-
ordering: str|None=Field(default=None, description="Sort field (e.g., 'date', '-date' for descending)")
60
-
per_page: int=Field(default=20, description="Number of results per page (default: 20, min: 1, max: 100)")
61
-
cursor: str|None=Field(default=None, description="Pagination cursor for fetching next page of results")
62
-
get_all: bool=Field(default=False, description="If True, fetch all results using cursor-based pagination")
63
123
mine: bool=Field(
64
124
default=True,
65
125
description="If True, fetch only incidents assigned to the current user. Set to False to get all incidents.",
suggestions.append(f"Filtered by validity: {', '.join(val_names)}")
116
+
117
+
# If no results, suggest how to get more
118
+
ifoccurrences_count==0andsuggestions:
119
+
suggestions.append("No occurrences matched the applied filters. Try with exclude_tags=[] or different status/severity/validity filters to see all occurrences.")
0 commit comments