@@ -329,9 +329,9 @@ func (c *connection) FindPublicProjectsInOrganization(ctx context.Context, orgID
329329 return c .projectsFromDTOs (res )
330330}
331331
332- func (c * connection ) FindProjectsByGithubURL (ctx context.Context , githubURL string ) ([]* database.Project , error ) {
332+ func (c * connection ) FindProjectsByGitRemote (ctx context.Context , remote string ) ([]* database.Project , error ) {
333333 var res []* projectDTO
334- err := c .getDB (ctx ).SelectContext (ctx , & res , "SELECT p.* FROM projects p WHERE lower(p.github_url )=lower($1) " , githubURL )
334+ err := c .getDB (ctx ).SelectContext (ctx , & res , "SELECT p.* FROM projects p WHERE lower(p.git_remote )=lower($1)" , remote )
335335 if err != nil {
336336 return nil , parseErr ("projects" , err )
337337 }
@@ -388,9 +388,9 @@ func (c *connection) InsertProject(ctx context.Context, opts *database.InsertPro
388388
389389 res := & projectDTO {}
390390 err := c .getDB (ctx ).QueryRowxContext (ctx , `
391- INSERT INTO projects (org_id, name, description, public, created_by_user_id, provisioner, prod_olap_driver, prod_olap_dsn, prod_slots, subpath, prod_branch, archive_asset_id, github_url , github_installation_id, github_repo_id, managed_git_repo_id, prod_ttl_seconds, prod_version)
391+ INSERT INTO projects (org_id, name, description, public, created_by_user_id, provisioner, prod_olap_driver, prod_olap_dsn, prod_slots, subpath, prod_branch, archive_asset_id, git_remote , github_installation_id, github_repo_id, managed_git_repo_id, prod_ttl_seconds, prod_version)
392392 VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18) RETURNING *` ,
393- opts .OrganizationID , opts .Name , opts .Description , opts .Public , opts .CreatedByUserID , opts .Provisioner , opts .ProdOLAPDriver , opts .ProdOLAPDSN , opts .ProdSlots , opts .Subpath , opts .ProdBranch , opts .ArchiveAssetID , opts .GithubURL , opts .GithubInstallationID , opts .GithubRepoID , opts .ManagedGitRepoID , opts .ProdTTLSeconds , opts .ProdVersion ,
393+ opts .OrganizationID , opts .Name , opts .Description , opts .Public , opts .CreatedByUserID , opts .Provisioner , opts .ProdOLAPDriver , opts .ProdOLAPDSN , opts .ProdSlots , opts .Subpath , opts .ProdBranch , opts .ArchiveAssetID , opts .GitRemote , opts .GithubInstallationID , opts .GithubRepoID , opts .ManagedGitRepoID , opts .ProdTTLSeconds , opts .ProdVersion ,
394394 ).StructScan (res )
395395 if err != nil {
396396 return nil , parseErr ("project" , err )
@@ -413,9 +413,9 @@ func (c *connection) UpdateProject(ctx context.Context, id string, opts *databas
413413
414414 res := & projectDTO {}
415415 err := c .getDB (ctx ).QueryRowxContext (ctx , `
416- UPDATE projects SET name=$1, description=$2, public=$3, prod_branch=$4, github_url =$5, github_installation_id=$6, github_repo_id=$7, managed_git_repo_id=$8, archive_asset_id=$9, prod_deployment_id=$10, provisioner=$11, prod_slots=$12, subpath=$13, prod_ttl_seconds=$14, annotations=$15, prod_version=$16, updated_on=now()
416+ UPDATE projects SET name=$1, description=$2, public=$3, prod_branch=$4, git_remote =$5, github_installation_id=$6, github_repo_id=$7, managed_git_repo_id=$8, archive_asset_id=$9, prod_deployment_id=$10, provisioner=$11, prod_slots=$12, subpath=$13, prod_ttl_seconds=$14, annotations=$15, prod_version=$16, updated_on=now()
417417 WHERE id=$17 RETURNING *` ,
418- opts .Name , opts .Description , opts .Public , opts .ProdBranch , opts .GithubURL , opts .GithubInstallationID , opts .GithubRepoID , opts .ManagedGitRepoID , opts .ArchiveAssetID , opts .ProdDeploymentID , opts .Provisioner , opts .ProdSlots , opts .Subpath , opts .ProdTTLSeconds , opts .Annotations , opts .ProdVersion , id ,
418+ opts .Name , opts .Description , opts .Public , opts .ProdBranch , opts .GitRemote , opts .GithubInstallationID , opts .GithubRepoID , opts .ManagedGitRepoID , opts .ArchiveAssetID , opts .ProdDeploymentID , opts .Provisioner , opts .ProdSlots , opts .Subpath , opts .ProdTTLSeconds , opts .Annotations , opts .ProdVersion , id ,
419419 ).StructScan (res )
420420 if err != nil {
421421 return nil , parseErr ("project" , err )
0 commit comments