Skip to content

Commit

Permalink
Do not show "reopen pr" button if merged
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsgrd committed Nov 19, 2024
1 parent a215cc3 commit bc5943b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/desktop/src/lib/pr/PullRequestCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import { getForgePrService } from '$lib/forge/interface/forgePrService';
import { showError } from '$lib/notifications/toasts';
import { copyToClipboard } from '$lib/utils/clipboard';
import { sleep } from '$lib/utils/sleep';
import { openExternalUrl } from '$lib/utils/url';
import { VirtualBranchService } from '$lib/vbranches/virtualBranch';
import { getContext, getContextStore } from '@gitbutler/shared/context';
Expand Down Expand Up @@ -298,6 +299,7 @@
const method = e.detail.method;
try {
await $prService?.merge(method, pr.number);
await sleep(500); // Expect forge to sometimes be slow.
await baseBranchService.fetchFromRemotes();
await Promise.all([
prMonitor?.refresh(),
Expand All @@ -313,7 +315,7 @@
}
}}
/>
{:else}
{:else if !pr.merged}
<Button
style="ghost"
outline
Expand Down

0 comments on commit bc5943b

Please sign in to comment.