From b5b9639296728159a03d41505545b583b29d74d4 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Thu, 13 Feb 2025 13:00:11 -0600 Subject: [PATCH 1/2] chore: rename `Gitlab` to `GitLab` Signed-off-by: Adam Setch --- collector/utils/extensions/RepoLoader/GitlabRepo/index.js | 6 +++--- collector/utils/extensions/RepoLoader/index.js | 8 ++++---- .../src/components/DataConnectorOption/media/index.js | 4 ++-- .../Modals/ManageWorkspace/DataConnectors/index.jsx | 4 ++-- server/models/documentSyncQueue.js | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/collector/utils/extensions/RepoLoader/GitlabRepo/index.js b/collector/utils/extensions/RepoLoader/GitlabRepo/index.js index cd74fb3164b..a634128b244 100644 --- a/collector/utils/extensions/RepoLoader/GitlabRepo/index.js +++ b/collector/utils/extensions/RepoLoader/GitlabRepo/index.js @@ -12,7 +12,7 @@ const { tokenizeString } = require("../../../tokenizer"); * @param {import("../../../middleware/setDataSigner").ResponseWithSigner} response - Express response object with encryptionWorker * @returns */ -async function loadGitlabRepo(args, response) { +async function loadGitLabRepo(args, response) { const repo = new RepoLoader(args); await repo.init(); @@ -110,7 +110,7 @@ async function loadGitlabRepo(args, response) { }; } -async function fetchGitlabFile({ +async function fetchGitLabFile({ repoUrl, branch, accessToken = null, @@ -249,4 +249,4 @@ ${issue.discussions.join("\n\n")} return markdown; } -module.exports = { loadGitlabRepo, fetchGitlabFile }; +module.exports = { loadGitLabRepo, fetchGitLabFile }; diff --git a/collector/utils/extensions/RepoLoader/index.js b/collector/utils/extensions/RepoLoader/index.js index 28e8780239e..7ee4a4c8181 100644 --- a/collector/utils/extensions/RepoLoader/index.js +++ b/collector/utils/extensions/RepoLoader/index.js @@ -2,7 +2,7 @@ * Dynamically load the correct repository loader from a specific platform * by default will return GitHub. * @param {('github'|'gitlab')} platform - * @returns {import("./GithubRepo/RepoLoader")|import("./GitlabRepo/RepoLoader")} the repo loader class for provider + * @returns {import("./GithubRepo/RepoLoader")|import("./GitLabRepo/RepoLoader")} the repo loader class for provider */ function resolveRepoLoader(platform = "github") { switch (platform) { @@ -11,7 +11,7 @@ function resolveRepoLoader(platform = "github") { return require("./GithubRepo/RepoLoader"); case "gitlab": console.log(`Loading GitLab RepoLoader...`); - return require("./GitlabRepo/RepoLoader"); + return require("./GitLabRepo/RepoLoader"); default: console.log(`Loading GitHub RepoLoader...`); return require("./GithubRepo/RepoLoader"); @@ -22,7 +22,7 @@ function resolveRepoLoader(platform = "github") { * Dynamically load the correct repository loader function from a specific platform * by default will return Github. * @param {('github'|'gitlab')} platform - * @returns {import("./GithubRepo")['fetchGithubFile'] | import("./GitlabRepo")['fetchGitlabFile']} the repo loader class for provider + * @returns {import("./GithubRepo")['fetchGithubFile'] | import("./GitLabRepo")['fetchGitLabFile']} the repo loader class for provider */ function resolveRepoLoaderFunction(platform = "github") { switch (platform) { @@ -31,7 +31,7 @@ function resolveRepoLoaderFunction(platform = "github") { return require("./GithubRepo").loadGithubRepo; case "gitlab": console.log(`Loading GitLab loader function...`); - return require("./GitlabRepo").loadGitlabRepo; + return require("./GitLabRepo").loadGitLabRepo; default: console.log(`Loading GitHub loader function...`); return require("./GithubRepo").loadGithubRepo; diff --git a/frontend/src/components/DataConnectorOption/media/index.js b/frontend/src/components/DataConnectorOption/media/index.js index 764fc7d60ac..d18803fa688 100644 --- a/frontend/src/components/DataConnectorOption/media/index.js +++ b/frontend/src/components/DataConnectorOption/media/index.js @@ -1,12 +1,12 @@ import GitHub from "./github.svg"; -import Gitlab from "./gitlab.svg"; +import GitLab from "./gitlab.svg"; import YouTube from "./youtube.svg"; import Link from "./link.svg"; import Confluence from "./confluence.jpeg"; const ConnectorImages = { github: GitHub, - gitlab: Gitlab, + gitlab: GitLab, youtube: YouTube, websiteDepth: Link, confluence: Confluence, diff --git a/frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx b/frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx index fdbef0751f4..eaafbd7c8db 100644 --- a/frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx +++ b/frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx @@ -1,7 +1,7 @@ import ConnectorImages from "@/components/DataConnectorOption/media"; import { MagnifyingGlass } from "@phosphor-icons/react"; import GithubOptions from "./Connectors/Github"; -import GitlabOptions from "./Connectors/Gitlab"; +import GitLabOptions from "./Connectors/GitLab"; import YoutubeOptions from "./Connectors/Youtube"; import ConfluenceOptions from "./Connectors/Confluence"; import { useState } from "react"; @@ -21,7 +21,7 @@ export const DATA_CONNECTORS = { image: ConnectorImages.gitlab, description: "Import an entire public or private GitLab repository in a single click.", - options: , + options: , }, "youtube-transcript": { name: "YouTube Transcript", diff --git a/server/models/documentSyncQueue.js b/server/models/documentSyncQueue.js index 1a88b0d5ab2..860a6701846 100644 --- a/server/models/documentSyncQueue.js +++ b/server/models/documentSyncQueue.js @@ -51,7 +51,7 @@ const DocumentSyncQueue = { if (chunkSource.startsWith("youtube://")) return true; // If is a youtube link if (chunkSource.startsWith("confluence://")) return true; // If is a confluence document link if (chunkSource.startsWith("github://")) return true; // If is a GitHub file reference - if (chunkSource.startsWith("gitlab://")) return true; // If is a Gitlab file reference + if (chunkSource.startsWith("gitlab://")) return true; // If is a GitLab file reference return false; }, From 3250974bbee05039bb8db7d168150e377a9c1f1c Mon Sep 17 00:00:00 2001 From: timothycarambat Date: Thu, 13 Feb 2025 12:13:06 -0800 Subject: [PATCH 2/2] undo code changes - breaks refs --- collector/utils/extensions/RepoLoader/GitlabRepo/index.js | 6 +++--- collector/utils/extensions/RepoLoader/index.js | 8 ++++---- .../Modals/ManageWorkspace/DataConnectors/index.jsx | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/collector/utils/extensions/RepoLoader/GitlabRepo/index.js b/collector/utils/extensions/RepoLoader/GitlabRepo/index.js index a634128b244..cd74fb3164b 100644 --- a/collector/utils/extensions/RepoLoader/GitlabRepo/index.js +++ b/collector/utils/extensions/RepoLoader/GitlabRepo/index.js @@ -12,7 +12,7 @@ const { tokenizeString } = require("../../../tokenizer"); * @param {import("../../../middleware/setDataSigner").ResponseWithSigner} response - Express response object with encryptionWorker * @returns */ -async function loadGitLabRepo(args, response) { +async function loadGitlabRepo(args, response) { const repo = new RepoLoader(args); await repo.init(); @@ -110,7 +110,7 @@ async function loadGitLabRepo(args, response) { }; } -async function fetchGitLabFile({ +async function fetchGitlabFile({ repoUrl, branch, accessToken = null, @@ -249,4 +249,4 @@ ${issue.discussions.join("\n\n")} return markdown; } -module.exports = { loadGitLabRepo, fetchGitLabFile }; +module.exports = { loadGitlabRepo, fetchGitlabFile }; diff --git a/collector/utils/extensions/RepoLoader/index.js b/collector/utils/extensions/RepoLoader/index.js index 7ee4a4c8181..28e8780239e 100644 --- a/collector/utils/extensions/RepoLoader/index.js +++ b/collector/utils/extensions/RepoLoader/index.js @@ -2,7 +2,7 @@ * Dynamically load the correct repository loader from a specific platform * by default will return GitHub. * @param {('github'|'gitlab')} platform - * @returns {import("./GithubRepo/RepoLoader")|import("./GitLabRepo/RepoLoader")} the repo loader class for provider + * @returns {import("./GithubRepo/RepoLoader")|import("./GitlabRepo/RepoLoader")} the repo loader class for provider */ function resolveRepoLoader(platform = "github") { switch (platform) { @@ -11,7 +11,7 @@ function resolveRepoLoader(platform = "github") { return require("./GithubRepo/RepoLoader"); case "gitlab": console.log(`Loading GitLab RepoLoader...`); - return require("./GitLabRepo/RepoLoader"); + return require("./GitlabRepo/RepoLoader"); default: console.log(`Loading GitHub RepoLoader...`); return require("./GithubRepo/RepoLoader"); @@ -22,7 +22,7 @@ function resolveRepoLoader(platform = "github") { * Dynamically load the correct repository loader function from a specific platform * by default will return Github. * @param {('github'|'gitlab')} platform - * @returns {import("./GithubRepo")['fetchGithubFile'] | import("./GitLabRepo")['fetchGitLabFile']} the repo loader class for provider + * @returns {import("./GithubRepo")['fetchGithubFile'] | import("./GitlabRepo")['fetchGitlabFile']} the repo loader class for provider */ function resolveRepoLoaderFunction(platform = "github") { switch (platform) { @@ -31,7 +31,7 @@ function resolveRepoLoaderFunction(platform = "github") { return require("./GithubRepo").loadGithubRepo; case "gitlab": console.log(`Loading GitLab loader function...`); - return require("./GitLabRepo").loadGitLabRepo; + return require("./GitlabRepo").loadGitlabRepo; default: console.log(`Loading GitHub loader function...`); return require("./GithubRepo").loadGithubRepo; diff --git a/frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx b/frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx index eaafbd7c8db..fdbef0751f4 100644 --- a/frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx +++ b/frontend/src/components/Modals/ManageWorkspace/DataConnectors/index.jsx @@ -1,7 +1,7 @@ import ConnectorImages from "@/components/DataConnectorOption/media"; import { MagnifyingGlass } from "@phosphor-icons/react"; import GithubOptions from "./Connectors/Github"; -import GitLabOptions from "./Connectors/GitLab"; +import GitlabOptions from "./Connectors/Gitlab"; import YoutubeOptions from "./Connectors/Youtube"; import ConfluenceOptions from "./Connectors/Confluence"; import { useState } from "react"; @@ -21,7 +21,7 @@ export const DATA_CONNECTORS = { image: ConnectorImages.gitlab, description: "Import an entire public or private GitLab repository in a single click.", - options: , + options: , }, "youtube-transcript": { name: "YouTube Transcript",