Skip to content

Commit 3422a2a

Browse files
committed
fix: fix issue board not enhanced when it is the only board in repo
1 parent 7dd5334 commit 3422a2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,6 @@ const enhanceIssueCard: MutationCallback = async (
727727
createIssueCardMergeRequestInfo(infoItems, opened, total);
728728

729729
// Collect rollover count for the issue
730-
731730
const iterationEvents =
732731
(await fetchGitLabData<IterationEvent[]>(
733732
getApiUrl(
@@ -774,7 +773,8 @@ const mergeRequestListRegex = /\/merge_requests(?!\/\d+)/;
774773

775774
const epicListRegex = /\/epics(?!\/\d+)/;
776775

777-
const issueBoardRegex = /\/boards\/\d+/;
776+
// When the board is the only board in the repo, the url is `/boards`
777+
const issueBoardRegex = /\/boards(?:\/\d+)?(?:\/)?(?:\?|$)/;
778778

779779
const enhance = () => {
780780
if (mergeRequestListRegex.test(window.location.href)) {

0 commit comments

Comments
 (0)