*/
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { post, RequestData } from '../helpers/request';
-import { BranchParameters } from '../types/branch-like';
import {
ComponentQualifier,
TreeComponent,
*/
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
-import { BranchParameters } from '../types/branch-like';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import {
MeasuresAndMetaWithMetrics,
MeasuresAndMetaWithPeriod,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { cloneDeep, pick } from 'lodash';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { DEFAULT_METRICS } from '../../helpers/mocks/metrics';
import { HttpStatus, RequestData } from '../../helpers/request';
import { mockMetric } from '../../helpers/testMocks';
import { isDefined } from '../../helpers/types';
-import { BranchParameters } from '../../types/branch-like';
import { TreeComponent, Visibility } from '../../types/component';
import {
Component,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { cloneDeep } from 'lodash';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { mockMetric, mockPeriod } from '../../helpers/testMocks';
-import { BranchParameters } from '../../types/branch-like';
import { MetricKey } from '../../types/metrics';
import { Metric, Period } from '../../types/types';
import { getMeasures, getMeasuresWithPeriod, getMeasuresWithPeriodAndMetrics } from '../measures';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { chunk, cloneDeep, uniqueId } from 'lodash';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { parseDate } from '../../helpers/dates';
import { mockAnalysis, mockAnalysisEvent } from '../../helpers/mocks/project-activity';
-import { BranchParameters } from '../../types/branch-like';
import { Analysis, ProjectAnalysisEventCategory } from '../../types/project-activity';
import {
changeEvent,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { cloneDeep, isArray, isObject, isString } from 'lodash';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { HousekeepingPolicy } from '../../apps/audit-logs/utils';
import { mockDefinition, mockSettingFieldDefinition } from '../../helpers/mocks/settings';
import { isDefined } from '../../helpers/types';
-import { BranchParameters } from '../../types/branch-like';
import {
ExtendedSettingDefinition,
SettingDefinition,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { chunk, cloneDeep, times } from 'lodash';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { parseDate } from '../../helpers/dates';
import { mockHistoryItem, mockMeasureHistory } from '../../helpers/mocks/project-activity';
-import { BranchParameters } from '../../types/branch-like';
import { MetricKey } from '../../types/metrics';
import { MeasureHistory } from '../../types/project-activity';
import { TimeMachineResponse, getAllTimeMachineData, getTimeMachineData } from '../time-machine';
*/
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { AppState } from '../types/appstate';
-import { BranchParameters } from '../types/branch-like';
import { Extension, NavigationComponent } from '../types/types';
export function getComponentNavigation(
*/
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { post, postJSON } from '../helpers/request';
-import { BranchParameters } from '../types/branch-like';
import {
Analysis,
ApplicationAnalysisEventCategory,
*/
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { post, postJSON } from '../helpers/request';
-import { BranchParameters } from '../types/branch-like';
import {
AddDeleteGroupPermissionsParameters,
AddDeleteUserPermissionsParameters,
*/
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { post } from '../helpers/request';
-import { BranchParameters } from '../types/branch-like';
import {
Hotspot,
HotspotAssignRequest,
import { omitBy } from 'lodash';
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { isCategoryDefinition } from '../apps/settings/utils';
import { post, postJSON, RequestData } from '../helpers/request';
-import { BranchParameters } from '../types/branch-like';
import {
ExtendedSettingDefinition,
SettingDefinition,
*/
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
-import { BranchParameters } from '../types/branch-like';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { MetricKey } from '../types/metrics';
import { Paging } from '../types/types';
import * as React from 'react';
import { useLocation } from '~sonar-aligned/components/hoc/withRouter';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { DEFAULT_ISSUES_QUERY } from '../../../../components/shared/utils';
import { isPullRequest } from '../../../../helpers/branch-like';
import { hasMessage, translate, translateWithParameters } from '../../../../helpers/l10n';
import { getPortfolioUrl, getProjectQueryUrl } from '../../../../helpers/urls';
import { useBranchesQuery } from '../../../../queries/branch';
-import { BranchParameters } from '../../../../types/branch-like';
import {
ComponentQualifier,
isApplication,
import { Path, To } from 'react-router-dom';
import { getBranchLikeQuery, isBranch, isMainBranch } from '~sonar-aligned/helpers/branch-like';
import { queryToSearch } from '~sonar-aligned/helpers/urls';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { getProfilePath } from '../apps/quality-profiles/utils';
import { DEFAULT_ISSUES_QUERY } from '../components/shared/utils';
-import { BranchLike, BranchParameters } from '../types/branch-like';
+import { BranchLike } from '../types/branch-like';
import { ComponentQualifier, isApplication, isPortfolioLike } from '../types/component';
import { MeasurePageView } from '../types/measures';
import { GraphType } from '../types/project-activity';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { UseQueryResult, useQuery } from '@tanstack/react-query';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { getTasksForComponent } from '../api/ce';
import { getMeasuresWithMetrics } from '../api/measures';
-import { BranchParameters } from '../types/branch-like';
import { MeasuresAndMetaWithMetrics } from '../types/measures';
import { Component } from '../types/types';
*/
import { useQuery } from '@tanstack/react-query';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import { getAllTimeMachineData } from '../api/time-machine';
-import { BranchParameters } from '../types/branch-like';
export function useAllMeasuresHistoryQuery(
component: string | undefined,
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
import {
CreateEventResponse,
ProjectActivityStatuses,
} from '../app/components/componentContext/withComponentContext';
import { parseDate } from '../helpers/dates';
import { serializeStringArray } from '../helpers/query';
-import { BranchParameters } from '../types/branch-like';
import { ParsedAnalysis } from '../types/project-activity';
import { useBranchesQuery } from './branch';
*/
import { isPullRequest } from '../../helpers/branch-like';
-import { Branch, BranchLike, BranchParameters, MainBranch } from '../../types/branch-like';
+import { BranchParameters } from '~sonar-aligned/types/branch-like';
+import { Branch, BranchLike, MainBranch } from '../../types/branch-like';
export function getBranchLikeQuery(
branchLike?: BranchLike,
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2024 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+export type BranchParameters = { branch?: string } | { pullRequest?: string };
orphanPullRequests: PullRequest[];
}
-export type BranchParameters = { branch?: string } | { pullRequest?: string };
-
export interface BranchWithNewCodePeriod extends Branch {
newCodePeriod?: NewCodeDefinition;
}