Accept HTTPS git repo URLs for storefront provision.
Normalize https://git.meshkee.com/... to SSH for the websites VM deploy key while keeping the URL users paste. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
7d123502f8
commit
5cd762c65d
@@ -41,6 +41,7 @@ import { WebsiteDeployAgentService } from '../website-deploy/website-deploy-agen
|
||||
import {
|
||||
deploySlugFromHost,
|
||||
isValidGitRepoUrl,
|
||||
normalizeGitRepoUrlForClone,
|
||||
} from '../website-deploy/website-deploy.util';
|
||||
|
||||
type BusinessRow = {
|
||||
@@ -470,7 +471,7 @@ export class BusinessAdminService {
|
||||
|
||||
if (gitRepoUrl && !isValidGitRepoUrl(gitRepoUrl)) {
|
||||
throw new BadRequestException(
|
||||
'gitRepoUrl must be an SSH git URL (e.g. git@git.meshkee.com:Meshkee-Websites/oaktasty.git)',
|
||||
'gitRepoUrl must be a git URL (e.g. https://git.meshkee.com/Meshkee-Websites/oaktasty.git)',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -512,7 +513,7 @@ export class BusinessAdminService {
|
||||
await this.websiteDeployAgent.provision({
|
||||
slug: deploySlug,
|
||||
host,
|
||||
gitRepoUrl,
|
||||
gitRepoUrl: normalizeGitRepoUrlForClone(gitRepoUrl),
|
||||
});
|
||||
} catch (err) {
|
||||
if (err && typeof err === 'object' && 'message' in err && typeof err.message === 'string') {
|
||||
@@ -561,7 +562,7 @@ export class BusinessAdminService {
|
||||
|
||||
if (gitRepoUrl && !isValidGitRepoUrl(gitRepoUrl)) {
|
||||
throw new BadRequestException(
|
||||
'gitRepoUrl must be an SSH git URL (e.g. git@git.meshkee.com:Meshkee-Websites/oaktasty.git)',
|
||||
'gitRepoUrl must be a git URL (e.g. https://git.meshkee.com/Meshkee-Websites/oaktasty.git)',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -600,7 +601,7 @@ export class BusinessAdminService {
|
||||
await this.websiteDeployAgent.provision({
|
||||
slug,
|
||||
host,
|
||||
gitRepoUrl,
|
||||
gitRepoUrl: normalizeGitRepoUrlForClone(gitRepoUrl),
|
||||
});
|
||||
deploySlug = slug;
|
||||
nextGitRepoUrl = gitRepoUrl;
|
||||
|
||||
Reference in New Issue
Block a user