Skip to content

Commit

Permalink
feature:OpenApi:支持编辑代码库 #4567
Browse files Browse the repository at this point in the history
projectName重新计算,方式用户在openapi输入错误的值,无法调接口
  • Loading branch information
mingshewhe committed Jul 21, 2021
1 parent 2a1e932 commit 8f4833a
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ import com.tencent.devops.scm.enums.CodeSvnRegion
import com.tencent.devops.scm.pojo.GitCommit
import com.tencent.devops.scm.pojo.GitRepositoryDirItem
import com.tencent.devops.scm.pojo.GitRepositoryResp
import com.tencent.devops.scm.utils.code.git.GitUtils
import com.tencent.devops.ticket.api.ServiceCredentialResource
import org.jooq.DSLContext
import org.jooq.impl.DSL
Expand Down Expand Up @@ -529,7 +530,7 @@ class RepositoryService @Autowired constructor(
repositoryCodeGitDao.create(
dslContext = transactionContext,
repositoryId = repositoryId,
projectName = repository.projectName,
projectName = GitUtils.getProjectName(repository.url),
userName = repository.userName,
credentialId = repository.credentialId,
authType = repository.authType
Expand All @@ -548,7 +549,7 @@ class RepositoryService @Autowired constructor(
repositoryCodeGitDao.create(
dslContext = transactionContext,
repositoryId = repositoryId,
projectName = repository.projectName,
projectName = GitUtils.getProjectName(repository.url),
userName = repository.userName,
credentialId = repository.credentialId,
authType = repository.authType
Expand All @@ -567,7 +568,7 @@ class RepositoryService @Autowired constructor(
repositoryCodeGitLabDao.create(
dslContext = transactionContext,
repositoryId = repositoryId,
projectName = repository.projectName,
projectName = GitUtils.getProjectName(repository.url),
userName = repository.userName,
privateToken = repository.credentialId
)
Expand Down Expand Up @@ -787,7 +788,7 @@ class RepositoryService @Autowired constructor(
repositoryCodeGitDao.edit(
dslContext = transactionContext,
repositoryId = repositoryId,
projectName = repository.projectName,
projectName = GitUtils.getProjectName(repository.url),
userName = repository.userName,
credentialId = repository.credentialId,
authType = repository.authType
Expand All @@ -806,7 +807,7 @@ class RepositoryService @Autowired constructor(
repositoryCodeGitDao.edit(
dslContext = transactionContext,
repositoryId = repositoryId,
projectName = repository.projectName,
projectName = GitUtils.getProjectName(repository.url),
userName = repository.userName,
credentialId = repository.credentialId,
authType = repository.authType
Expand Down Expand Up @@ -847,7 +848,7 @@ class RepositoryService @Autowired constructor(
repositoryCodeGitLabDao.edit(
dslContext = transactionContext,
repositoryId = repositoryId,
projectName = repository.projectName,
projectName = GitUtils.getProjectName(repository.url),
userName = repository.userName,
credentialId = repository.credentialId
)
Expand Down

0 comments on commit 8f4833a

Please sign in to comment.