handleGetSecurityHotspotList = (
hotspotKeys: string[],
data: {
- projectKey: string;
+ project: string;
branch?: string;
},
) => {
};
handleGetSecurityHotspots = (data: {
- projectKey: string;
+ project: string;
p: number;
ps: number;
status?: HotspotStatus;
inNewCodePeriod?: boolean;
onlyMine?: boolean;
p: number;
- projectKey: string;
+ project: string;
ps: number;
resolution?: HotspotResolution;
status?: HotspotStatus;
} & BranchParameters,
projectIsIndexing = false,
): Promise<HotspotSearchResponse> {
- return getJSON(
- projectIsIndexing ? HOTSPOTS_LIST_URL : HOTSPOTS_SEARCH_URL,
- projectIsIndexing ? { ...data, project: data.projectKey } : data,
- ).catch(throwGlobalError);
+ return getJSON(projectIsIndexing ? HOTSPOTS_LIST_URL : HOTSPOTS_SEARCH_URL, data).catch(
+ throwGlobalError,
+ );
}
export function getSecurityHotspotList(
hotspotKeys: string[],
data: {
- projectKey: string;
+ project: string;
} & BranchParameters,
projectIsIndexing = false,
): Promise<HotspotSearchResponse> {
return getJSON(projectIsIndexing ? HOTSPOTS_LIST_URL : HOTSPOTS_SEARCH_URL, {
...data,
hotspots: hotspotKeys.join(),
- ...(projectIsIndexing ? { project: data.projectKey } : {}),
}).catch(throwGlobalError);
}
...hotspotFilters,
inNewCodePeriod: filters.inNewCodePeriod && Boolean(filterByFile), // only add new code period when filtering by file
p: page,
- projectKey: component.key,
+ project: component.key,
ps: PAGE_SIZE,
status: HotspotStatus.TO_REVIEW, // we're only interested in unresolved hotspots
...getBranchLikeQuery(branchLike),
return getSecurityHotspotList(
hotspotKeys,
{
- projectKey: component.key,
+ project: component.key,
...getBranchLikeQuery(branchLike),
},
component.needIssueSync,
inNewCodePeriod: filters.inNewCodePeriod,
...(component.needIssueSync ? {} : { onlyMine: filters.assignedToMe }),
p: page,
- projectKey: component.key,
+ project: component.key,
ps: PAGE_SIZE,
resolution,
status,
inNewCodePeriod: false,
onlyMine: true,
p: 1,
- projectKey: 'guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed',
+ project: 'guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed',
ps: 500,
resolution: undefined,
status: 'TO_REVIEW',
inNewCodePeriod: true,
onlyMine: true,
p: 1,
- projectKey: 'guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed',
+ project: 'guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed',
ps: 500,
resolution: undefined,
status: 'TO_REVIEW',