Skip to content

Commit 9020957

Browse files
committed
Drop some review related code
1 parent cb0f4f9 commit 9020957

12 files changed

+16
-1102
lines changed

apps/desktop/src/components/BranchReviewButRequest.svelte

Lines changed: 0 additions & 264 deletions
This file was deleted.

apps/desktop/src/components/CanPublishReviewPlugin.svelte

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts">
22
import { DefaultForgeFactory } from '$lib/forge/forgeFactory.svelte';
3-
import { StackPublishingService } from '$lib/history/stackPublishingService';
43
import { StackService } from '$lib/stacks/stackService.svelte';
54
import { getContext } from '@gitbutler/shared/context';
65
@@ -16,43 +15,23 @@
1615
1716
const forge = getContext(DefaultForgeFactory);
1817
const stackService = getContext(StackService);
19-
const stackPublishingService = getContext(StackPublishingService);
20-
21-
const branch = $derived(
22-
stackId && branchName ? stackService.branchByName(projectId, stackId, branchName) : undefined
23-
);
2418
2519
const commits = $derived(
2620
stackId && branchName ? stackService.commits(projectId, stackId, branchName) : undefined
2721
);
2822
const branchEmpty = $derived(commits?.current.data ? commits.current.data.length === 0 : false);
29-
const name = $derived(branch?.current.data ? branch.current.data.name : undefined);
3023
const prService = $derived(forge.current.prService);
3124
const prResult = $derived(prNumber ? prService?.get(prNumber) : undefined);
3225
const pr = $derived(prResult?.current.data);
3326
34-
const canPublish = stackPublishingService.canPublish;
35-
const canPublishBR = $derived(!!($canPublish && name && !reviewId));
3627
const canPublishPR = $derived(forge.current.authenticated && !pr);
3728
38-
const ctaLabel = $derived.by(() => {
39-
if (canPublishBR && canPublishPR) {
40-
return 'Submit for review…';
41-
} else if (canPublishBR) {
42-
return 'Create Butler Request…';
43-
} else if (canPublishPR) {
44-
return 'Create Pull Request…';
45-
}
46-
return 'Submit for review…';
47-
});
29+
const ctaLabel = 'Create Pull Request…';
4830
4931
export const imports = {
5032
get allowedToPublishPR() {
5133
return forge.current.authenticated;
5234
},
53-
get allowedToPublishBR() {
54-
return $canPublish;
55-
},
5635
get branchIsEmpty() {
5736
return branchEmpty;
5837
},
@@ -65,9 +44,6 @@
6544
get reviewId() {
6645
return reviewId;
6746
},
68-
get canPublishBR() {
69-
return canPublishBR;
70-
},
7147
get canPublishPR() {
7248
return canPublishPR;
7349
},

0 commit comments

Comments
 (0)