Inline a type in useProjectKey in sonarqube plugin

Type used only used and referenced in one place

Signed-off-by: Neemys <36508659+Neemys@users.noreply.github.com>
This commit is contained in:
Neemys
2022-07-28 16:50:43 +02:00
parent 932a31ade7
commit ae0e115dd1
@@ -16,11 +16,6 @@
import { Entity } from '@backstage/catalog-model';
export interface ProjectInfo {
projectInstance: string;
projectKey: string;
}
export const SONARQUBE_PROJECT_KEY_ANNOTATION = 'sonarqube.org/project-key';
export const SONARQUBE_PROJECT_INSTANCE_SEPARATOR = '/';
@@ -35,7 +30,12 @@ export const isSonarQubeAvailable = (entity: Entity) =>
* @param entity entity to find the sonarqube information from.
* @return a ProjectInfo properly populated.
*/
export const useProjectInfo = (entity: Entity): ProjectInfo => {
export const useProjectInfo = (
entity: Entity,
): {
projectInstance: string;
projectKey: string;
} => {
let projectInstance = '';
let projectKey = '';
const annotation =