mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-04 15:53:30 +03:00
Rename file gitHostService.ts -> gitHost.ts
This commit is contained in:
parent
c7d0be9f33
commit
b1349ccd62
@ -6,10 +6,10 @@
|
||||
import { BaseBranchService } from '$lib/baseBranch/baseBranchService';
|
||||
import ContextMenu from '$lib/components/contextmenu/ContextMenu.svelte';
|
||||
import { mapErrorToToast } from '$lib/gitHost/github/errorMap';
|
||||
import { getGitHost } from '$lib/gitHost/interface/gitHost';
|
||||
import { getGitHostListingService } from '$lib/gitHost/interface/gitHostListingService';
|
||||
import { getGitHostPrMonitor } from '$lib/gitHost/interface/gitHostPrMonitor';
|
||||
import { getGitHostPrService } from '$lib/gitHost/interface/gitHostPrService';
|
||||
import { getGitHost } from '$lib/gitHost/interface/gitHostService';
|
||||
import { showError, showToast } from '$lib/notifications/toasts';
|
||||
import Button from '$lib/shared/Button.svelte';
|
||||
import Icon from '$lib/shared/Icon.svelte';
|
||||
|
@ -4,11 +4,11 @@
|
||||
import { BaseBranch } from '$lib/baseBranch/baseBranch';
|
||||
import { projectLaneCollapsed } from '$lib/config/config';
|
||||
import FileCard from '$lib/file/FileCard.svelte';
|
||||
import { getGitHost } from '$lib/gitHost/interface/gitHost';
|
||||
import { createGitHostChecksMonitorStore } from '$lib/gitHost/interface/gitHostChecksMonitor';
|
||||
import { getGitHostListingService } from '$lib/gitHost/interface/gitHostListingService';
|
||||
import { createGitHostPrMonitorStore } from '$lib/gitHost/interface/gitHostPrMonitor';
|
||||
import { createGitHostPrServiceStore } from '$lib/gitHost/interface/gitHostPrService';
|
||||
import { getGitHost } from '$lib/gitHost/interface/gitHostService';
|
||||
import { persisted } from '$lib/persisted/persisted';
|
||||
import { SETTINGS, type Settings } from '$lib/settings/userSettings';
|
||||
import Resizer from '$lib/shared/Resizer.svelte';
|
||||
@ -37,16 +37,14 @@
|
||||
|
||||
const baseBranch = getContextStore(BaseBranch);
|
||||
|
||||
const gitHostService = getGitHost();
|
||||
const gitHost = getGitHost();
|
||||
const baseBranchName = $derived($baseBranch.shortName);
|
||||
const upstreamName = $derived(branch.upstreamName);
|
||||
|
||||
// BRANCH SERVICE
|
||||
const prService = createGitHostPrServiceStore(undefined);
|
||||
$effect(() =>
|
||||
prService.set(
|
||||
upstreamName ? $gitHostService?.prService(baseBranchName, upstreamName) : undefined
|
||||
)
|
||||
prService.set(upstreamName ? $gitHost?.prService(baseBranchName, upstreamName) : undefined)
|
||||
);
|
||||
|
||||
// Pretty cumbersome way of getting the PR number, would be great if we can
|
||||
@ -63,9 +61,7 @@
|
||||
$effect(() => gitHostPrMonitorStore.set(prMonitor));
|
||||
|
||||
const gitHostChecksMonitorStore = createGitHostChecksMonitorStore(undefined);
|
||||
const checksMonitor = $derived(
|
||||
sourceBranch ? $gitHostService?.checksMonitor(sourceBranch) : undefined
|
||||
);
|
||||
const checksMonitor = $derived(sourceBranch ? $gitHost?.checksMonitor(sourceBranch) : undefined);
|
||||
$effect(() => gitHostChecksMonitorStore.set(checksMonitor));
|
||||
|
||||
// BRANCH
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { GitHub } from './github/github';
|
||||
import { ProjectMetrics } from '$lib/metrics/projectMetrics';
|
||||
import type { RepoInfo } from '$lib/url/gitUrl';
|
||||
import type { GitHost } from './interface/gitHostService';
|
||||
import type { GitHost } from './interface/gitHost';
|
||||
import type { Octokit } from '@octokit/rest';
|
||||
|
||||
// Used on a branch level to acquire the right kind of merge request / checks
|
||||
|
@ -4,7 +4,7 @@ import { GitHubPrService } from './githubPrService';
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import type { ProjectMetrics } from '$lib/metrics/projectMetrics';
|
||||
import type { RepoInfo } from '$lib/url/gitUrl';
|
||||
import type { GitHost } from '../interface/gitHostService';
|
||||
import type { GitHost } from '../interface/gitHost';
|
||||
import type { DetailedPullRequest } from '../interface/types';
|
||||
|
||||
export type PrAction = 'creating_pr';
|
||||
|
@ -4,7 +4,7 @@
|
||||
import noBranchesSvg from '$lib/assets/empty-state/no-branches.svg?raw';
|
||||
import { getBranchServiceStore } from '$lib/branches/service';
|
||||
import FilterButton from '$lib/components/FilterBranchesButton.svelte';
|
||||
import { getGitHost } from '$lib/gitHost/interface/gitHostService';
|
||||
import { getGitHost } from '$lib/gitHost/interface/gitHost';
|
||||
import { persisted } from '$lib/persisted/persisted';
|
||||
import ScrollableContainer from '$lib/shared/ScrollableContainer.svelte';
|
||||
import TextBox from '$lib/shared/TextBox.svelte';
|
||||
|
@ -13,8 +13,8 @@
|
||||
import { ReorderDropzoneManagerFactory } from '$lib/dragging/reorderDropzoneManager';
|
||||
import { DefaultGitHostFactory } from '$lib/gitHost/gitHostFactory';
|
||||
import { octokitFromAccessToken } from '$lib/gitHost/github/octokit';
|
||||
import { createGitHostStore } from '$lib/gitHost/interface/gitHost';
|
||||
import { createGitHostListingServiceStore } from '$lib/gitHost/interface/gitHostListingService';
|
||||
import { createGitHostStore } from '$lib/gitHost/interface/gitHostService';
|
||||
import History from '$lib/history/History.svelte';
|
||||
import { HistoryService } from '$lib/history/history';
|
||||
import MetricsReporter from '$lib/metrics/MetricsReporter.svelte';
|
||||
@ -99,11 +99,11 @@
|
||||
});
|
||||
|
||||
$effect.pre(() => {
|
||||
const gitHostService = repoInfo ? gitHostFactory?.build(repoInfo) : undefined;
|
||||
const ghListService = gitHostService?.listService();
|
||||
const gitHost = repoInfo ? gitHostFactory?.build(repoInfo) : undefined;
|
||||
const ghListService = gitHost?.listService();
|
||||
|
||||
listServiceStore.set(ghListService);
|
||||
githubRepoServiceStore.set(gitHostService);
|
||||
githubRepoServiceStore.set(gitHost);
|
||||
branchServiceStore.set(new BranchService(vbranchService, remoteBranchService, ghListService));
|
||||
});
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
import { BaseBranchService } from '$lib/baseBranch/baseBranchService';
|
||||
import Board from '$lib/components/Board.svelte';
|
||||
import { projectHttpsWarningBannerDismissed } from '$lib/config/config';
|
||||
import { getGitHost } from '$lib/gitHost/interface/gitHostService';
|
||||
import { getGitHost } from '$lib/gitHost/interface/gitHost';
|
||||
import { showToast } from '$lib/notifications/toasts';
|
||||
import Scrollbar from '$lib/shared/Scrollbar.svelte';
|
||||
import { getContext } from '$lib/utils/context';
|
||||
|
Loading…
Reference in New Issue
Block a user