Skip to content

Commit a6abfc3

Browse files
committed
fix: lint
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
1 parent d64814a commit a6abfc3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • services/apps/automatic_projects_discovery_worker/src/sources/insights-discussions

services/apps/automatic_projects_discovery_worker/src/sources/insights-discussions/source.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,17 @@ async function graphqlRequest<T>(query: string, variables: Record<string, unknow
9393
})
9494
}
9595

96-
9796
// Extracts github.com/{owner}/{repo} URLs from markdown text, normalised to the repo root.
9897
function extractRepoUrls(text: string): string[] {
9998
const urls = new Set<string>()
10099
const regex = /https?:\/\/github\.com\/([a-zA-Z0-9_.-]+)\/([a-zA-Z0-9_.-]+)/gi
101100
let match: RegExpExecArray | null
102101
while ((match = regex.exec(text)) !== null) {
103102
const owner = match[1].toLowerCase()
104-
const repo = match[2].replace(/\.git$/, '').replace(/[.,;:!?]+$/, '').toLowerCase()
103+
const repo = match[2]
104+
.replace(/\.git$/, '')
105+
.replace(/[.,;:!?]+$/, '')
106+
.toLowerCase()
105107
if (owner && repo && !GITHUB_NON_REPO_OWNERS.has(owner)) {
106108
urls.add(`https://github.com/${owner}/${repo}`)
107109
}
@@ -146,7 +148,6 @@ async function getDiscussionCategoryId(): Promise<string> {
146148
return category.id
147149
}
148150

149-
150151
async function fetchDiscussionsPage(
151152
categoryId: string,
152153
cursor: string | null,

0 commit comments

Comments
 (0)