]> source.dussan.org Git - sonarqube.git/commitdiff
Deprecate gateId parameter for /api/qualitygates/search
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Fri, 18 Sep 2020 14:18:09 +0000 (16:18 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 8 Oct 2020 20:08:01 +0000 (20:08 +0000)
server/sonar-web/src/main/js/api/quality-gates.ts
server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx

index c81bc29a1207f95c6ac2d0bc2cd1cabde4618ea8..4078b2664d7a48399ba34c39e41dc05c4856101c 100644 (file)
@@ -109,7 +109,7 @@ export function getGateForProject(data: {
 }
 
 export function searchProjects(data: {
-  gateId: string;
+  gateName: string;
   organization?: string;
   page?: number;
   pageSize?: number;
index a7eadc3eaa402bded97007391f117fc91e1f2220..170f62078e0a2c5b14649ecc25700f92fb69ed44 100644 (file)
@@ -67,7 +67,7 @@ export default class Projects extends React.PureComponent<Props, State> {
 
   fetchProjects = (searchParams: SelectListSearchParams) =>
     searchProjects({
-      gateId: this.props.qualityGate.id,
+      gateName: this.props.qualityGate.name,
       organization: this.props.organization,
       page: searchParams.page,
       pageSize: searchParams.pageSize,
index 15e36a03b11b7921bc9b5eeb0e39dac3e574fffe..f7a76c49793cfc8a5072e5528f1848e30f917947 100644 (file)
@@ -69,7 +69,7 @@ it('should render correctly', async () => {
 
   expect(searchProjects).toHaveBeenCalledWith(
     expect.objectContaining({
-      gateId: qualityGate.id,
+      gateName: qualityGate.name,
       organization,
       page: 1,
       pageSize: 100,