]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-15115 SONAR-15121 Fix missing hotspot code in App branches and remove permalink
authorJeremy Davis <jeremy.davis@sonarsource.com>
Thu, 1 Jul 2021 09:48:58 +0000 (11:48 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 1 Jul 2021 20:03:19 +0000 (20:03 +0000)
16 files changed:
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainerRenderer.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerRenderer.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotSnippetContainer-test.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotReviewHistoryAndComments-test.tsx.snap
server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotSnippetContainer-test.tsx.snap
server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotSnippetContainerRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotViewerRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/__snapshots__/Status-test.tsx.snap
server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/LineNumber.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineNumber-test.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/Line-test.tsx.snap
server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/LineNumber-test.tsx.snap
server/sonar-web/src/main/js/helpers/mocks/security-hotspots.ts
server/sonar-web/src/main/js/types/security-hotspots.ts

index 4e0cbe6cb8968c7aa2fd458b5da32de52eb59dc8..fb4a5147c622165484d04962c60e181295e9a031 100644 (file)
@@ -37,6 +37,7 @@ import { inSnippet, LINES_BELOW_ISSUE } from './utils';
 interface Props {
   branchLike: BranchLike | undefined;
   component: T.SourceViewerFile;
+  displayLineNumberOptions?: boolean;
   displaySCM?: boolean;
   duplications?: T.Duplication[];
   duplicationsByLine?: { [line: number]: number[] };
@@ -130,7 +131,7 @@ export default class SnippetViewer extends React.PureComponent<Props> {
   }) {
     const secondaryIssueLocations = getSecondaryIssueLocationsForLine(line, this.props.locations);
 
-    const { duplications, duplicationsByLine } = this.props;
+    const { displayLineNumberOptions, duplications, duplicationsByLine } = this.props;
     const duplicationsCount = duplications ? duplications.length : 0;
     const lineDuplications =
       (duplicationsCount && duplicationsByLine && duplicationsByLine[line.line]) || [];
@@ -146,6 +147,7 @@ export default class SnippetViewer extends React.PureComponent<Props> {
         displayCoverage={true}
         displayDuplications={displayDuplications}
         displayIssues={!isSinkLine || issuesForLine.length > 1}
+        displayLineNumberOptions={displayLineNumberOptions}
         displayLocationMarkers={true}
         displaySCM={displaySCM}
         duplications={lineDuplications}
index ab47a648f7db80a06dbedba27b930bc5ab1087e5..6934ac0d5a2f3eb460637d6dba8ed54c4f23c468 100644 (file)
@@ -75,8 +75,9 @@ export default function HotspotSnippetContainerRenderer(
             <SourceViewerContext.Provider /* Used by LineOptionsPopup */
               value={{ branchLike, file: sourceViewerFile }}>
               <SnippetViewer
-                branchLike={branchLike}
+                branchLike={undefined}
                 component={sourceViewerFile}
+                displayLineNumberOptions={false}
                 displaySCM={false}
                 expandBlock={(_i, direction) => props.onExpandBlock(direction)}
                 handleCloseIssues={noop}
index 20d6f086e62314f826b3984ffab12420ed7fd238..0ab8dd44b48cb4b4441b97251bd949f2b6bc706e 100644 (file)
@@ -27,7 +27,7 @@ import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
 import { translate } from 'sonar-ui-common/helpers/l10n';
 import { getPathUrlAsString } from 'sonar-ui-common/helpers/urls';
 import { withCurrentUser } from '../../../components/hoc/withCurrentUser';
-import { getBranchLikeQuery } from '../../../helpers/branch-like';
+import { fillBranchLike, getBranchLikeQuery } from '../../../helpers/branch-like';
 import { getComponentSecurityHotspotsUrl, getRuleUrl } from '../../../helpers/urls';
 import { isLoggedIn } from '../../../helpers/users';
 import { BranchLike } from '../../../types/branch-like';
@@ -144,7 +144,7 @@ export function HotspotViewerRenderer(props: HotspotViewerRendererProps) {
           </div>
 
           <HotspotSnippetContainer
-            branchLike={branchLike}
+            branchLike={fillBranchLike(hotspot.project.branch, hotspot.project.pullRequest)}
             component={component}
             hotspot={hotspot}
           />
index 8b1e007b08450cae53c42ce2f9a348a5366e9df2..4e7698db77230109ae75a70e91120b2ffd315ec9 100644 (file)
@@ -23,8 +23,9 @@ import * as React from 'react';
 import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils';
 import { getSources } from '../../../../api/components';
 import { mockBranch } from '../../../../helpers/mocks/branch-like';
-import { mockHotspot } from '../../../../helpers/mocks/security-hotspots';
+import { mockHotspot, mockHotspotComponent } from '../../../../helpers/mocks/security-hotspots';
 import { mockComponent, mockSourceLine } from '../../../../helpers/testMocks';
+import { ComponentQualifier } from '../../../../types/component';
 import HotspotSnippetContainer from '../HotspotSnippetContainer';
 import HotspotSnippetContainerRenderer from '../HotspotSnippetContainerRenderer';
 
@@ -46,6 +47,7 @@ it('should load sources on mount', async () => {
   );
 
   const hotspot = mockHotspot({
+    project: mockHotspotComponent({ branch: branch.name, qualifier: ComponentQualifier.Project }),
     textRange: { startLine: 10, endLine: 11, startOffset: 0, endOffset: 12 }
   });
 
@@ -116,6 +118,7 @@ describe('Expansion', () => {
   });
 
   const hotspot = mockHotspot({
+    project: mockHotspotComponent({ branch: branch.name, qualifier: ComponentQualifier.Project }),
     textRange: { startLine: 10, endLine: 11, startOffset: 0, endOffset: 12 }
   });
 
index 8758b8bff1c0caea7f4faf86fdbc085dd9f1ed53..e576a075c6635da4c3c797704adcfeac47ffb1ff 100644 (file)
@@ -29,48 +29,22 @@ exports[`should render correctly 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -192,48 +166,22 @@ exports[`should render correctly without user 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
index c049d85dad723b8e3776b2c087086b1db8843a95..2dcb778d83e0ef884e56e3b34f3c1c63cb2364ed 100644 (file)
@@ -32,48 +32,22 @@ exports[`should render correctly 1`] = `
       "changelog": Array [],
       "comment": Array [],
       "component": Object {
-        "breadcrumbs": Array [],
-        "key": "my-project",
-        "name": "MyProject",
+        "key": "hotspot-component",
+        "longName": "Hotspot component long name",
+        "name": "Hotspot Component",
+        "path": "path/to/component",
         "qualifier": "FIL",
-        "qualityGate": Object {
-          "isDefault": true,
-          "key": "30",
-          "name": "Sonar way",
-        },
-        "qualityProfiles": Array [
-          Object {
-            "deleted": false,
-            "key": "my-qp",
-            "language": "ts",
-            "name": "Sonar way",
-          },
-        ],
-        "tags": Array [],
       },
       "creationDate": "2013-05-13T17:55:41+0200",
       "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
       "line": 142,
       "message": "'3' is a magic number.",
       "project": Object {
-        "breadcrumbs": Array [],
-        "key": "my-project",
-        "name": "MyProject",
+        "key": "hotspot-component",
+        "longName": "Hotspot component long name",
+        "name": "Hotspot Component",
+        "path": "path/to/component",
         "qualifier": "TRK",
-        "qualityGate": Object {
-          "isDefault": true,
-          "key": "30",
-          "name": "Sonar way",
-        },
-        "qualityProfiles": Array [
-          Object {
-            "deleted": false,
-            "key": "my-qp",
-            "language": "ts",
-            "name": "Sonar way",
-          },
-        ],
-        "tags": Array [],
       },
       "resolution": "FIXED",
       "rule": Object {
@@ -126,13 +100,13 @@ exports[`should render correctly 1`] = `
   sourceLines={Array []}
   sourceViewerFile={
     Object {
-      "key": "my-project",
+      "key": "hotspot-component",
       "measures": Object {
         "lines": undefined,
       },
-      "path": "",
-      "project": "my-project",
-      "projectName": "MyProject",
+      "path": "path/to/component",
+      "project": "hotspot-component",
+      "projectName": "Hotspot Component",
       "q": "FIL",
       "uuid": "",
     }
index 6ddb9d1ee5ff0e7d582f1d7d898a58e5a0547cf4..2807a80413331d6ac37a98ada7a849652171bac5 100644 (file)
@@ -116,14 +116,6 @@ exports[`should render correctly: with sourcelines 1`] = `
         }
       >
         <SnippetViewer
-          branchLike={
-            Object {
-              "analysisDate": "2018-01-01",
-              "excludedFromPurge": true,
-              "isMain": true,
-              "name": "master",
-            }
-          }
           component={
             Object {
               "key": "foo",
@@ -140,6 +132,7 @@ exports[`should render correctly: with sourcelines 1`] = `
               "uuid": "foo-bar",
             }
           }
+          displayLineNumberOptions={false}
           displaySCM={false}
           expandBlock={[Function]}
           handleCloseIssues={[Function]}
@@ -167,48 +160,22 @@ exports[`should render correctly: with sourcelines 1`] = `
               "changelog": Array [],
               "comment": Array [],
               "component": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "FIL",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "creationDate": "2013-05-13T17:55:41+0200",
               "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
               "line": 142,
               "message": "'3' is a magic number.",
               "project": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "TRK",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "resolution": "FIXED",
               "rule": Object {
index b7455bf8090bc650c6a3f89f883fcce67c709d77..66edb7be3b4d76d42c346c908215d87c686af03e 100644 (file)
@@ -62,7 +62,7 @@ exports[`should render correctly 1`] = `
         >
           <HotspotOpenInIdeButton
             hotspotKey="01fc972e-2a3c-433e-bcae-0bd7f88f5123"
-            projectKey="my-project"
+            projectKey="hotspot-component"
           />
         </div>
         <ClipboardButton
@@ -142,48 +142,22 @@ exports[`should render correctly 1`] = `
                   "changelog": Array [],
                   "comment": Array [],
                   "component": Object {
-                    "breadcrumbs": Array [],
-                    "key": "my-project",
-                    "name": "MyProject",
+                    "key": "hotspot-component",
+                    "longName": "Hotspot component long name",
+                    "name": "Hotspot Component",
+                    "path": "path/to/component",
                     "qualifier": "FIL",
-                    "qualityGate": Object {
-                      "isDefault": true,
-                      "key": "30",
-                      "name": "Sonar way",
-                    },
-                    "qualityProfiles": Array [
-                      Object {
-                        "deleted": false,
-                        "key": "my-qp",
-                        "language": "ts",
-                        "name": "Sonar way",
-                      },
-                    ],
-                    "tags": Array [],
                   },
                   "creationDate": "2013-05-13T17:55:41+0200",
                   "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
                   "line": 142,
                   "message": "'3' is a magic number.",
                   "project": Object {
-                    "breadcrumbs": Array [],
-                    "key": "my-project",
-                    "name": "MyProject",
+                    "key": "hotspot-component",
+                    "longName": "Hotspot component long name",
+                    "name": "Hotspot Component",
+                    "path": "path/to/component",
                     "qualifier": "TRK",
-                    "qualityGate": Object {
-                      "isDefault": true,
-                      "key": "30",
-                      "name": "Sonar way",
-                    },
-                    "qualityProfiles": Array [
-                      Object {
-                        "deleted": false,
-                        "key": "my-qp",
-                        "language": "ts",
-                        "name": "Sonar way",
-                      },
-                    ],
-                    "tags": Array [],
                   },
                   "resolution": "FIXED",
                   "rule": Object {
@@ -248,48 +222,22 @@ exports[`should render correctly 1`] = `
               "changelog": Array [],
               "comment": Array [],
               "component": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "FIL",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "creationDate": "2013-05-13T17:55:41+0200",
               "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
               "line": 142,
               "message": "'3' is a magic number.",
               "project": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "TRK",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "resolution": "FIXED",
               "rule": Object {
@@ -330,14 +278,6 @@ exports[`should render correctly 1`] = `
       </div>
     </div>
     <HotspotSnippetContainer
-      branchLike={
-        Object {
-          "analysisDate": "2018-01-01",
-          "excludedFromPurge": true,
-          "isMain": false,
-          "name": "branch-6.7",
-        }
-      }
       component={
         Object {
           "breadcrumbs": Array [],
@@ -380,48 +320,22 @@ exports[`should render correctly 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -479,48 +393,22 @@ exports[`should render correctly 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -589,48 +477,22 @@ exports[`should render correctly 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -736,7 +598,7 @@ exports[`should render correctly: anonymous user 1`] = `
         >
           <HotspotOpenInIdeButton
             hotspotKey="01fc972e-2a3c-433e-bcae-0bd7f88f5123"
-            projectKey="my-project"
+            projectKey="hotspot-component"
           />
         </div>
         <ClipboardButton
@@ -816,48 +678,22 @@ exports[`should render correctly: anonymous user 1`] = `
                   "changelog": Array [],
                   "comment": Array [],
                   "component": Object {
-                    "breadcrumbs": Array [],
-                    "key": "my-project",
-                    "name": "MyProject",
+                    "key": "hotspot-component",
+                    "longName": "Hotspot component long name",
+                    "name": "Hotspot Component",
+                    "path": "path/to/component",
                     "qualifier": "FIL",
-                    "qualityGate": Object {
-                      "isDefault": true,
-                      "key": "30",
-                      "name": "Sonar way",
-                    },
-                    "qualityProfiles": Array [
-                      Object {
-                        "deleted": false,
-                        "key": "my-qp",
-                        "language": "ts",
-                        "name": "Sonar way",
-                      },
-                    ],
-                    "tags": Array [],
                   },
                   "creationDate": "2013-05-13T17:55:41+0200",
                   "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
                   "line": 142,
                   "message": "'3' is a magic number.",
                   "project": Object {
-                    "breadcrumbs": Array [],
-                    "key": "my-project",
-                    "name": "MyProject",
+                    "key": "hotspot-component",
+                    "longName": "Hotspot component long name",
+                    "name": "Hotspot Component",
+                    "path": "path/to/component",
                     "qualifier": "TRK",
-                    "qualityGate": Object {
-                      "isDefault": true,
-                      "key": "30",
-                      "name": "Sonar way",
-                    },
-                    "qualityProfiles": Array [
-                      Object {
-                        "deleted": false,
-                        "key": "my-qp",
-                        "language": "ts",
-                        "name": "Sonar way",
-                      },
-                    ],
-                    "tags": Array [],
                   },
                   "resolution": "FIXED",
                   "rule": Object {
@@ -922,48 +758,22 @@ exports[`should render correctly: anonymous user 1`] = `
               "changelog": Array [],
               "comment": Array [],
               "component": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "FIL",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "creationDate": "2013-05-13T17:55:41+0200",
               "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
               "line": 142,
               "message": "'3' is a magic number.",
               "project": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "TRK",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "resolution": "FIXED",
               "rule": Object {
@@ -1004,14 +814,6 @@ exports[`should render correctly: anonymous user 1`] = `
       </div>
     </div>
     <HotspotSnippetContainer
-      branchLike={
-        Object {
-          "analysisDate": "2018-01-01",
-          "excludedFromPurge": true,
-          "isMain": false,
-          "name": "branch-6.7",
-        }
-      }
       component={
         Object {
           "breadcrumbs": Array [],
@@ -1054,48 +856,22 @@ exports[`should render correctly: anonymous user 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -1153,48 +929,22 @@ exports[`should render correctly: anonymous user 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -1263,48 +1013,22 @@ exports[`should render correctly: anonymous user 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -1410,7 +1134,7 @@ exports[`should render correctly: assignee without name 1`] = `
         >
           <HotspotOpenInIdeButton
             hotspotKey="01fc972e-2a3c-433e-bcae-0bd7f88f5123"
-            projectKey="my-project"
+            projectKey="hotspot-component"
           />
         </div>
         <ClipboardButton
@@ -1490,48 +1214,22 @@ exports[`should render correctly: assignee without name 1`] = `
                   "changelog": Array [],
                   "comment": Array [],
                   "component": Object {
-                    "breadcrumbs": Array [],
-                    "key": "my-project",
-                    "name": "MyProject",
+                    "key": "hotspot-component",
+                    "longName": "Hotspot component long name",
+                    "name": "Hotspot Component",
+                    "path": "path/to/component",
                     "qualifier": "FIL",
-                    "qualityGate": Object {
-                      "isDefault": true,
-                      "key": "30",
-                      "name": "Sonar way",
-                    },
-                    "qualityProfiles": Array [
-                      Object {
-                        "deleted": false,
-                        "key": "my-qp",
-                        "language": "ts",
-                        "name": "Sonar way",
-                      },
-                    ],
-                    "tags": Array [],
                   },
                   "creationDate": "2013-05-13T17:55:41+0200",
                   "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
                   "line": 142,
                   "message": "'3' is a magic number.",
                   "project": Object {
-                    "breadcrumbs": Array [],
-                    "key": "my-project",
-                    "name": "MyProject",
+                    "key": "hotspot-component",
+                    "longName": "Hotspot component long name",
+                    "name": "Hotspot Component",
+                    "path": "path/to/component",
                     "qualifier": "TRK",
-                    "qualityGate": Object {
-                      "isDefault": true,
-                      "key": "30",
-                      "name": "Sonar way",
-                    },
-                    "qualityProfiles": Array [
-                      Object {
-                        "deleted": false,
-                        "key": "my-qp",
-                        "language": "ts",
-                        "name": "Sonar way",
-                      },
-                    ],
-                    "tags": Array [],
                   },
                   "resolution": "FIXED",
                   "rule": Object {
@@ -1596,48 +1294,22 @@ exports[`should render correctly: assignee without name 1`] = `
               "changelog": Array [],
               "comment": Array [],
               "component": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "FIL",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "creationDate": "2013-05-13T17:55:41+0200",
               "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
               "line": 142,
               "message": "'3' is a magic number.",
               "project": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "TRK",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "resolution": "FIXED",
               "rule": Object {
@@ -1678,14 +1350,6 @@ exports[`should render correctly: assignee without name 1`] = `
       </div>
     </div>
     <HotspotSnippetContainer
-      branchLike={
-        Object {
-          "analysisDate": "2018-01-01",
-          "excludedFromPurge": true,
-          "isMain": false,
-          "name": "branch-6.7",
-        }
-      }
       component={
         Object {
           "breadcrumbs": Array [],
@@ -1728,48 +1392,22 @@ exports[`should render correctly: assignee without name 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -1827,48 +1465,22 @@ exports[`should render correctly: assignee without name 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -1937,48 +1549,22 @@ exports[`should render correctly: assignee without name 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -2084,7 +1670,7 @@ exports[`should render correctly: deleted assignee 1`] = `
         >
           <HotspotOpenInIdeButton
             hotspotKey="01fc972e-2a3c-433e-bcae-0bd7f88f5123"
-            projectKey="my-project"
+            projectKey="hotspot-component"
           />
         </div>
         <ClipboardButton
@@ -2164,48 +1750,22 @@ exports[`should render correctly: deleted assignee 1`] = `
                   "changelog": Array [],
                   "comment": Array [],
                   "component": Object {
-                    "breadcrumbs": Array [],
-                    "key": "my-project",
-                    "name": "MyProject",
+                    "key": "hotspot-component",
+                    "longName": "Hotspot component long name",
+                    "name": "Hotspot Component",
+                    "path": "path/to/component",
                     "qualifier": "FIL",
-                    "qualityGate": Object {
-                      "isDefault": true,
-                      "key": "30",
-                      "name": "Sonar way",
-                    },
-                    "qualityProfiles": Array [
-                      Object {
-                        "deleted": false,
-                        "key": "my-qp",
-                        "language": "ts",
-                        "name": "Sonar way",
-                      },
-                    ],
-                    "tags": Array [],
                   },
                   "creationDate": "2013-05-13T17:55:41+0200",
                   "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
                   "line": 142,
                   "message": "'3' is a magic number.",
                   "project": Object {
-                    "breadcrumbs": Array [],
-                    "key": "my-project",
-                    "name": "MyProject",
+                    "key": "hotspot-component",
+                    "longName": "Hotspot component long name",
+                    "name": "Hotspot Component",
+                    "path": "path/to/component",
                     "qualifier": "TRK",
-                    "qualityGate": Object {
-                      "isDefault": true,
-                      "key": "30",
-                      "name": "Sonar way",
-                    },
-                    "qualityProfiles": Array [
-                      Object {
-                        "deleted": false,
-                        "key": "my-qp",
-                        "language": "ts",
-                        "name": "Sonar way",
-                      },
-                    ],
-                    "tags": Array [],
                   },
                   "resolution": "FIXED",
                   "rule": Object {
@@ -2270,48 +1830,22 @@ exports[`should render correctly: deleted assignee 1`] = `
               "changelog": Array [],
               "comment": Array [],
               "component": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "FIL",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "creationDate": "2013-05-13T17:55:41+0200",
               "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
               "line": 142,
               "message": "'3' is a magic number.",
               "project": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "TRK",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "resolution": "FIXED",
               "rule": Object {
@@ -2352,14 +1886,6 @@ exports[`should render correctly: deleted assignee 1`] = `
       </div>
     </div>
     <HotspotSnippetContainer
-      branchLike={
-        Object {
-          "analysisDate": "2018-01-01",
-          "excludedFromPurge": true,
-          "isMain": false,
-          "name": "branch-6.7",
-        }
-      }
       component={
         Object {
           "breadcrumbs": Array [],
@@ -2402,48 +1928,22 @@ exports[`should render correctly: deleted assignee 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -2501,48 +2001,22 @@ exports[`should render correctly: deleted assignee 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -2611,48 +2085,22 @@ exports[`should render correctly: deleted assignee 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -2765,7 +2213,7 @@ exports[`should render correctly: unassigned 1`] = `
         >
           <HotspotOpenInIdeButton
             hotspotKey="01fc972e-2a3c-433e-bcae-0bd7f88f5123"
-            projectKey="my-project"
+            projectKey="hotspot-component"
           />
         </div>
         <ClipboardButton
@@ -2845,48 +2293,22 @@ exports[`should render correctly: unassigned 1`] = `
                   "changelog": Array [],
                   "comment": Array [],
                   "component": Object {
-                    "breadcrumbs": Array [],
-                    "key": "my-project",
-                    "name": "MyProject",
+                    "key": "hotspot-component",
+                    "longName": "Hotspot component long name",
+                    "name": "Hotspot Component",
+                    "path": "path/to/component",
                     "qualifier": "FIL",
-                    "qualityGate": Object {
-                      "isDefault": true,
-                      "key": "30",
-                      "name": "Sonar way",
-                    },
-                    "qualityProfiles": Array [
-                      Object {
-                        "deleted": false,
-                        "key": "my-qp",
-                        "language": "ts",
-                        "name": "Sonar way",
-                      },
-                    ],
-                    "tags": Array [],
                   },
                   "creationDate": "2013-05-13T17:55:41+0200",
                   "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
                   "line": 142,
                   "message": "'3' is a magic number.",
                   "project": Object {
-                    "breadcrumbs": Array [],
-                    "key": "my-project",
-                    "name": "MyProject",
+                    "key": "hotspot-component",
+                    "longName": "Hotspot component long name",
+                    "name": "Hotspot Component",
+                    "path": "path/to/component",
                     "qualifier": "TRK",
-                    "qualityGate": Object {
-                      "isDefault": true,
-                      "key": "30",
-                      "name": "Sonar way",
-                    },
-                    "qualityProfiles": Array [
-                      Object {
-                        "deleted": false,
-                        "key": "my-qp",
-                        "language": "ts",
-                        "name": "Sonar way",
-                      },
-                    ],
-                    "tags": Array [],
                   },
                   "resolution": "FIXED",
                   "rule": Object {
@@ -2951,48 +2373,22 @@ exports[`should render correctly: unassigned 1`] = `
               "changelog": Array [],
               "comment": Array [],
               "component": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "FIL",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "creationDate": "2013-05-13T17:55:41+0200",
               "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
               "line": 142,
               "message": "'3' is a magic number.",
               "project": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "TRK",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "resolution": "FIXED",
               "rule": Object {
@@ -3033,14 +2429,6 @@ exports[`should render correctly: unassigned 1`] = `
       </div>
     </div>
     <HotspotSnippetContainer
-      branchLike={
-        Object {
-          "analysisDate": "2018-01-01",
-          "excludedFromPurge": true,
-          "isMain": false,
-          "name": "branch-6.7",
-        }
-      }
       component={
         Object {
           "breadcrumbs": Array [],
@@ -3083,48 +2471,22 @@ exports[`should render correctly: unassigned 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -3182,48 +2544,22 @@ exports[`should render correctly: unassigned 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
@@ -3292,48 +2628,22 @@ exports[`should render correctly: unassigned 1`] = `
           "changelog": Array [],
           "comment": Array [],
           "component": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "FIL",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "creationDate": "2013-05-13T17:55:41+0200",
           "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
           "line": 142,
           "message": "'3' is a magic number.",
           "project": Object {
-            "breadcrumbs": Array [],
-            "key": "my-project",
-            "name": "MyProject",
+            "key": "hotspot-component",
+            "longName": "Hotspot component long name",
+            "name": "Hotspot Component",
+            "path": "path/to/component",
             "qualifier": "TRK",
-            "qualityGate": Object {
-              "isDefault": true,
-              "key": "30",
-              "name": "Sonar way",
-            },
-            "qualityProfiles": Array [
-              Object {
-                "deleted": false,
-                "key": "my-qp",
-                "language": "ts",
-                "name": "Sonar way",
-              },
-            ],
-            "tags": Array [],
           },
           "resolution": "FIXED",
           "rule": Object {
index 4eaecc3eca75dd66c0ebcef86d0dad97bf2cea4d..8437b72cf6efbd967b51e92799ee6022ed81a04f 100644 (file)
@@ -35,48 +35,22 @@ exports[`should render correctly: closed 1`] = `
               "changelog": Array [],
               "comment": Array [],
               "component": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "FIL",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "creationDate": "2013-05-13T17:55:41+0200",
               "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
               "line": 142,
               "message": "'3' is a magic number.",
               "project": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "TRK",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "resolution": "FIXED",
               "rule": Object {
@@ -177,48 +151,22 @@ exports[`should render correctly: open 1`] = `
               "changelog": Array [],
               "comment": Array [],
               "component": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "FIL",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "creationDate": "2013-05-13T17:55:41+0200",
               "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
               "line": 142,
               "message": "'3' is a magic number.",
               "project": Object {
-                "breadcrumbs": Array [],
-                "key": "my-project",
-                "name": "MyProject",
+                "key": "hotspot-component",
+                "longName": "Hotspot component long name",
+                "name": "Hotspot Component",
+                "path": "path/to/component",
                 "qualifier": "TRK",
-                "qualityGate": Object {
-                  "isDefault": true,
-                  "key": "30",
-                  "name": "Sonar way",
-                },
-                "qualityProfiles": Array [
-                  Object {
-                    "deleted": false,
-                    "key": "my-qp",
-                    "language": "ts",
-                    "name": "Sonar way",
-                  },
-                ],
-                "tags": Array [],
               },
               "resolution": "FIXED",
               "rule": Object {
index d0b7f207c034d98aa62038c82cba518af253c3b3..8d7deed7708560c19c790935b20fd850f34e6b95 100644 (file)
@@ -37,6 +37,7 @@ interface Props {
   displayIssueLocationsCount?: boolean;
   displayIssueLocationsLink?: boolean;
   displayIssues: boolean;
+  displayLineNumberOptions?: boolean;
   displayLocationMarkers?: boolean;
   displaySCM?: boolean;
   duplications: number[];
@@ -94,6 +95,7 @@ export default class Line extends React.PureComponent<Props> {
       displayDuplications,
       displayIssueLocationsCount,
       displayIssueLocationsLink,
+      displayLineNumberOptions,
       displayLocationMarkers,
       highlightedLocationMessage,
       displayIssues,
@@ -127,9 +129,12 @@ export default class Line extends React.PureComponent<Props> {
 
     const bottomPadding = verticalBuffer ? verticalBuffer * LINE_HEIGHT : undefined;
 
+    // default is true
+    const displayOptions = displayLineNumberOptions !== false;
+
     return (
       <tr className={className} data-line-number={line.line}>
-        <LineNumber firstLineNumber={firstLineNumber} line={line} />
+        <LineNumber displayOptions={displayOptions} firstLineNumber={firstLineNumber} line={line} />
 
         {displaySCM && <LineSCM line={line} previousLine={previousLine} />}
         {displayIssues && !displayAllIssues ? (
index 21df17a4fa2990465f4281add793a800cf26e278..48e63fe419d1b42fa99856704ac39417c84a0863 100644 (file)
@@ -23,32 +23,37 @@ import { translateWithParameters } from 'sonar-ui-common/helpers/l10n';
 import LineOptionsPopup from './LineOptionsPopup';
 
 export interface LineNumberProps {
+  displayOptions: boolean;
   firstLineNumber: number;
   line: T.SourceLine;
 }
 
-export function LineNumber({ firstLineNumber, line }: LineNumberProps) {
+export function LineNumber({ displayOptions, firstLineNumber, line }: LineNumberProps) {
   const [isOpen, setOpen] = React.useState<boolean>(false);
   const { line: lineNumber } = line;
   const hasLineNumber = !!lineNumber;
 
   return hasLineNumber ? (
     <td className="source-meta source-line-number" data-line-number={lineNumber}>
-      <Toggler
-        closeOnClickOutside={true}
-        onRequestClose={() => setOpen(false)}
-        open={isOpen}
-        overlay={<LineOptionsPopup firstLineNumber={firstLineNumber} line={line} />}>
-        <span
-          aria-expanded={isOpen}
-          aria-haspopup={true}
-          aria-label={translateWithParameters('source_viewer.line_X', lineNumber)}
-          onClick={() => setOpen(true)}
-          role="button"
-          tabIndex={0}>
-          {lineNumber}
-        </span>
-      </Toggler>
+      {displayOptions ? (
+        <Toggler
+          closeOnClickOutside={true}
+          onRequestClose={() => setOpen(false)}
+          open={isOpen}
+          overlay={<LineOptionsPopup firstLineNumber={firstLineNumber} line={line} />}>
+          <span
+            aria-expanded={isOpen}
+            aria-haspopup={true}
+            aria-label={translateWithParameters('source_viewer.line_X', lineNumber)}
+            onClick={() => setOpen(true)}
+            role="button"
+            tabIndex={0}>
+            {lineNumber}
+          </span>
+        </Toggler>
+      ) : (
+        lineNumber
+      )}
     </td>
   ) : (
     <td className="source-meta source-line-number" />
index f536dd12bcb66a5f90310a78e289d4664746b6ac..849f09a059acaefa5c2ecd12d10c90b10a0dba2a 100644 (file)
@@ -25,8 +25,13 @@ it('should render correctly', () => {
   expect(shallowRender()).toMatchSnapshot('default');
   expect(shallowRender({ line: { line: 0 } })).toMatchSnapshot('no line number');
   expect(shallowRender({ line: { line: 12 } })).toMatchSnapshot('first line');
+  expect(shallowRender({ displayOptions: false, line: { line: 12 } })).toMatchSnapshot(
+    'no options'
+  );
 });
 
 function shallowRender(props: Partial<LineNumberProps> = {}) {
-  return shallow(<LineNumber firstLineNumber={10} line={{ line: 20 }} {...props} />);
+  return shallow(
+    <LineNumber displayOptions={true} firstLineNumber={10} line={{ line: 20 }} {...props} />
+  );
 }
index 853ff92974d66eaf984e015d4cbaa80cac2b23c9..784b30a9192026e09c77bd55c2953dc7b29794c3 100644 (file)
@@ -6,6 +6,7 @@ exports[`should render correctly 1`] = `
   data-line-number={16}
 >
   <Memo(LineNumber)
+    displayOptions={true}
     firstLineNumber={1}
     line={
       Object {
@@ -145,6 +146,7 @@ exports[`should render correctly for last, new, and highlighted lines 1`] = `
   data-line-number={16}
 >
   <Memo(LineNumber)
+    displayOptions={true}
     firstLineNumber={1}
     line={
       Object {
@@ -284,6 +286,7 @@ exports[`should render correctly with coverage 1`] = `
   data-line-number={16}
 >
   <Memo(LineNumber)
+    displayOptions={true}
     firstLineNumber={1}
     line={
       Object {
@@ -439,6 +442,7 @@ exports[`should render correctly with duplication information 1`] = `
   data-line-number={16}
 >
   <Memo(LineNumber)
+    displayOptions={true}
     firstLineNumber={1}
     line={
       Object {
@@ -639,6 +643,7 @@ exports[`should render correctly with issues info 1`] = `
   data-line-number={16}
 >
   <Memo(LineNumber)
+    displayOptions={true}
     firstLineNumber={1}
     line={
       Object {
@@ -854,6 +859,7 @@ exports[`should render correctly: no SCM 1`] = `
   data-line-number={16}
 >
   <Memo(LineNumber)
+    displayOptions={true}
     firstLineNumber={1}
     line={
       Object {
index ea264c2f415a8a4704195a414c90264f3da3e3a9..553567189c892f3e43b0388ec862f8e483346b58 100644 (file)
@@ -73,3 +73,12 @@ exports[`should render correctly: no line number 1`] = `
   className="source-meta source-line-number"
 />
 `;
+
+exports[`should render correctly: no options 1`] = `
+<td
+  className="source-meta source-line-number"
+  data-line-number={12}
+>
+  12
+</td>
+`;
index 90ce5c0c031e7d4b33ddbcb88c5d3edbaadd16a0..74a2b80a6478fd2665a4453e62cd20a1aa1d587c 100644 (file)
@@ -21,6 +21,7 @@ import { ComponentQualifier } from '../../types/component';
 import { Standards } from '../../types/security';
 import {
   Hotspot,
+  HotspotComponent,
   HotspotResolution,
   HotspotRule,
   HotspotStatus,
@@ -29,7 +30,7 @@ import {
   ReviewHistoryType,
   RiskExposure
 } from '../../types/security-hotspots';
-import { mockComponent, mockUser } from '../testMocks';
+import { mockUser } from '../testMocks';
 
 export function mockRawHotspot(overrides: Partial<RawHotspot> = {}): RawHotspot {
   return {
@@ -61,12 +62,12 @@ export function mockHotspot(overrides?: Partial<Hotspot>): Hotspot {
     canChangeStatus: true,
     changelog: [],
     comment: [],
-    component: mockComponent({ qualifier: ComponentQualifier.File }),
+    component: mockHotspotComponent({ qualifier: ComponentQualifier.File }),
     creationDate: '2013-05-13T17:55:41+0200',
     key: '01fc972e-2a3c-433e-bcae-0bd7f88f5123',
     line: 142,
     message: "'3' is a magic number.",
-    project: mockComponent({ qualifier: ComponentQualifier.Project }),
+    project: mockHotspotComponent({ qualifier: ComponentQualifier.Project }),
     resolution: HotspotResolution.FIXED,
     rule: mockHotspotRule(),
     status: HotspotStatus.REVIEWED,
@@ -82,6 +83,17 @@ export function mockHotspot(overrides?: Partial<Hotspot>): Hotspot {
   };
 }
 
+export function mockHotspotComponent(overrides?: Partial<HotspotComponent>): HotspotComponent {
+  return {
+    key: 'hotspot-component',
+    name: 'Hotspot Component',
+    longName: 'Hotspot component long name',
+    qualifier: ComponentQualifier.File,
+    path: 'path/to/component',
+    ...overrides
+  };
+}
+
 export function mockHotspotRule(overrides?: Partial<HotspotRule>): HotspotRule {
   return {
     key: 'squid:S2077',
index ba043f8f34433afc994fd78b4e257c4fcb02f81c..557f92ac3eca8cf42623d81ff2971c8e6a584bcb 100644 (file)
@@ -17,6 +17,8 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+import { ComponentQualifier } from './component';
+
 export enum RiskExposure {
   LOW = 'LOW',
   MEDIUM = 'MEDIUM',
@@ -77,12 +79,12 @@ export interface Hotspot {
   canChangeStatus: boolean;
   changelog: T.IssueChangelog[];
   comment: HotspotComment[];
-  component: T.Component;
+  component: HotspotComponent;
   creationDate: string;
   key: string;
   line?: number;
   message: string;
-  project: T.Component;
+  project: HotspotComponent;
   resolution?: HotspotResolution;
   rule: HotspotRule;
   status: HotspotStatus;
@@ -91,6 +93,16 @@ export interface Hotspot {
   users: T.UserBase[];
 }
 
+export interface HotspotComponent {
+  key: string;
+  qualifier: ComponentQualifier;
+  name: string;
+  longName: string;
+  path: string;
+  branch?: string;
+  pullRequest?: string;
+}
+
 export interface HotspotUpdateFields {
   status: HotspotStatus;
   resolution?: HotspotResolution;