From 48658675d7bbb3ecd5e3a51df0447b65bb0b1219 Mon Sep 17 00:00:00 2001
From: Federico Brigante <me@fregante.com>
Date: Thu, 11 May 2023 05:28:40 +0800
Subject: Improve reliability of `list-prs-for-branch` (#6641)

---
 source/features/default-branch-button.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'source/features/default-branch-button.tsx')

diff --git a/source/features/default-branch-button.tsx b/source/features/default-branch-button.tsx
index eb9258df..866f80c8 100644
--- a/source/features/default-branch-button.tsx
+++ b/source/features/default-branch-button.tsx
@@ -10,6 +10,7 @@ import getDefaultBranch from '../github-helpers/get-default-branch.js';
 import observe from '../helpers/selector-observer.js';
 import {branchSelector} from '../github-helpers/selectors.js';
 import isDefaultBranch from '../github-helpers/is-default-branch.js';
+import {isRepoCommitListRoot} from '../github-helpers/index.js';
 
 async function add(branchSelector: HTMLElement): Promise<void> {
 	// Don't show the button if we’re already on the default branch
@@ -55,7 +56,7 @@ void features.add(import.meta.url, {
 	include: [
 		pageDetect.isRepoTree,
 		pageDetect.isSingleFile,
-		pageDetect.isRepoCommitList,
+		isRepoCommitListRoot,
 	],
 	exclude: [
 		pageDetect.isRepoHome,
-- 
cgit v1.2.3

