From 15600fe3303abee0724665356de9e0cedf06517e Mon Sep 17 00:00:00 2001 From: yakov116 <16872793+yakov116@users.noreply.github.com> Date: Sun, 12 Apr 2020 18:45:28 -0400 Subject: [PATCH] Disable `update-pr-from-base-branch` when action is impossible (#2994) --- source/features/update-pr-from-base-branch.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/features/update-pr-from-base-branch.tsx b/source/features/update-pr-from-base-branch.tsx index 8d1cbf64da2..dbeb713bc1d 100644 --- a/source/features/update-pr-from-base-branch.tsx +++ b/source/features/update-pr-from-base-branch.tsx @@ -69,6 +69,10 @@ async function addButton(): Promise { const {base, head} = getBranches(); + if (head === 'unknown repository') { + return; + } + // Draft PRs already have this info on the page const [outOfDateContainer] = select.all('.completeness-indicator-problem + .status-heading') .filter(title => (title.textContent!).includes('out-of-date'));