From fcf0ee619b2fea80186453c43264bb70cec88bbd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 27 Dec 2025 08:51:12 +0000 Subject: [PATCH] Improve URL pattern matching and remove redundant checks Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --- back/config/util.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/back/config/util.ts b/back/config/util.ts index cb9c65c3..4ebc16fc 100644 --- a/back/config/util.ts +++ b/back/config/util.ts @@ -537,12 +537,14 @@ export async function setSystemTimezone(timezone: string): Promise { // Helper function to check if a name is a GitHub URL function isGitHubUrl(name: string): boolean { - return !!name.match(/^(https?:\/\/|git\+)/i); + // Support git+https://, git+http://, https://, and http:// URLs + // This covers GitHub URLs and other git-compatible repositories + return !!name.match(/^(git\+https?:\/\/|https?:\/\/)/i); } // Helper function to check if a name is a requirements file function isRequirementsFile(name: string): boolean { - return !!name.match(/requirements.*\.(txt|in)$/i) || name === 'requirements.txt'; + return !!name.match(/requirements.*\.(txt|in)$/i); } // Helper function to check if a name is a pyproject.toml file