From f1a83e752bdc06e58a96d4c507dabbbbb5330a36 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Thu, 28 Jul 2022 14:57:14 +0700 Subject: [PATCH] Rename`isOrganizationDiscussion` to `isTeamDiscussion` --- index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.ts b/index.ts index 9cd8ef67..fdefeddc 100644 --- a/index.ts +++ b/index.ts @@ -185,8 +185,8 @@ export const isOrganizationProfile = (): boolean => exists('meta[name="hovercard export const isOrganizationRepo = (): boolean => Boolean(document.querySelector('[data-owner-scoped-search-url]')?.dataset['ownerScopedSearchUrl']!.startsWith('/org')); -export const isOrganizationDiscussion = (url: URL | HTMLAnchorElement | Location = location): boolean => /^orgs\/[^/]+\/teams\/[^/]+($|\/discussions)/.test(getCleanPathname(url)); -addTests('isOrganizationDiscussion', [ +export const isTeamDiscussion = (url: URL | HTMLAnchorElement | Location = location): boolean => /^orgs\/[^/]+\/teams\/[^/]+($|\/discussions)/.test(getCleanPathname(url)); +addTests('isTeamDiscussion', [ 'https://github.com/orgs/refined-github/teams/core-team/discussions?pinned=1', 'https://github.com/orgs/refined-github/teams/core-team/discussions/1', 'https://github.com/orgs/refined-github/teams/core-team', @@ -630,7 +630,7 @@ export const hasComments = (url: URL | HTMLAnchorElement | Location = location): isPR(url) || isIssue(url) || isCommit(url) - || isOrganizationDiscussion(url) + || isTeamDiscussion(url) || isSingleGist(url); addTests('hasRichTextEditor', combinedTestOnly);