From afb3cd3aa635d9e660de3ead51815c3d94ddcfef Mon Sep 17 00:00:00 2001 From: hejieehe <904696180@qq.com> Date: Thu, 5 Sep 2024 14:47:04 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat=EF=BC=9A=E6=BA=90=E6=9D=90=E6=96=99?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=BC=98=E5=8C=96=20#10733?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tencent/bk/devops/git/core/pojo/GitSourceSettings.kt | 6 +++++- .../bk/devops/git/core/pojo/api/PipelineBuildMaterial.kt | 4 +++- .../bk/devops/git/core/pojo/input/CheckoutAtomParamInput.kt | 6 +++++- .../bk/devops/git/core/pojo/input/GitCodeAtomParamInput.kt | 6 +++++- .../git/core/pojo/input/GitCodeCommandAtomParamInput.kt | 6 +++++- .../bk/devops/git/core/service/helper/GitLogHelper.kt | 3 ++- .../git/core/service/input/CheckoutAtomParamInputAdapter.kt | 6 ++++-- .../git/core/service/input/GitCodeAtomParamInputAdapter.kt | 3 ++- .../service/input/GitCodeCommandAtomParamInputAdapter.kt | 3 ++- 9 files changed, 33 insertions(+), 10 deletions(-) diff --git a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/GitSourceSettings.kt b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/GitSourceSettings.kt index fca6a9b3..1aa879ae 100644 --- a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/GitSourceSettings.kt +++ b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/GitSourceSettings.kt @@ -221,7 +221,11 @@ data class GitSourceSettings( /** * 工蜂边缘节点 proxy url,给http.proxy使用,可以不需要schema */ - val tGitCacheProxyUrl: String? = null + val tGitCacheProxyUrl: String? = null, + /** + * 是否为源材料主仓库 + */ + val mainRepo: Boolean? = false ) { val sourceRepoUrlEqualsRepoUrl: Boolean get() = GitUtil.isSameRepository( diff --git a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/api/PipelineBuildMaterial.kt b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/api/PipelineBuildMaterial.kt index f3b1897f..2950e961 100644 --- a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/api/PipelineBuildMaterial.kt +++ b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/api/PipelineBuildMaterial.kt @@ -39,5 +39,7 @@ data class PipelineBuildMaterial( val newCommitId: String?, val newCommitComment: String?, val commitTimes: Int?, - val scmType: ScmType? + val scmType: ScmType?, + val mainRepo: Boolean? = false, + val createTime: Long? = System.currentTimeMillis() / 1000 ) diff --git a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/CheckoutAtomParamInput.kt b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/CheckoutAtomParamInput.kt index 438e74db..ef629907 100644 --- a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/CheckoutAtomParamInput.kt +++ b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/CheckoutAtomParamInput.kt @@ -140,5 +140,9 @@ data class CheckoutAtomParamInput( /** * 工蜂边缘节点 proxy url,给http.proxy使用 */ - val tGitCacheProxyUrl: String? = null + val tGitCacheProxyUrl: String? = null, + /** + * 是否为源材料主仓库 + */ + val mainRepo: Boolean? = false ) diff --git a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeAtomParamInput.kt b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeAtomParamInput.kt index cc577f84..f853e25c 100644 --- a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeAtomParamInput.kt +++ b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeAtomParamInput.kt @@ -123,5 +123,9 @@ data class GitCodeAtomParamInput( /** * 工蜂边缘节点 proxy url,给http.proxy使用 */ - val tGitCacheProxyUrl: String? = null + val tGitCacheProxyUrl: String? = null, + /** + * 是否为源材料主仓库 + */ + val mainRepo: Boolean? = false ) diff --git a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeCommandAtomParamInput.kt b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeCommandAtomParamInput.kt index 5e95502b..839d8b8d 100644 --- a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeCommandAtomParamInput.kt +++ b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeCommandAtomParamInput.kt @@ -134,5 +134,9 @@ data class GitCodeCommandAtomParamInput( /** * 工蜂边缘节点 proxy url,给http.proxy使用 */ - val tGitCacheProxyUrl: String? = null + val tGitCacheProxyUrl: String? = null, + /** + * 是否为源材料主仓库 + */ + val mainRepo: Boolean? = false ) diff --git a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/helper/GitLogHelper.kt b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/helper/GitLogHelper.kt index 5de51b21..dcd72286 100644 --- a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/helper/GitLogHelper.kt +++ b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/helper/GitLogHelper.kt @@ -245,7 +245,8 @@ class GitLogHelper( newCommitId = commitMaterial.newCommitId ?: commitMaterial.lastCommitId, newCommitComment = commitMaterial.newCommitComment, commitTimes = commitMaterial.commitTimes, - scmType = commitMaterial.scmType + scmType = commitMaterial.scmType, + mainRepo = settings.mainRepo ) ) ) diff --git a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/CheckoutAtomParamInputAdapter.kt b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/CheckoutAtomParamInputAdapter.kt index f2b0600a..8f65ae68 100644 --- a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/CheckoutAtomParamInputAdapter.kt +++ b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/CheckoutAtomParamInputAdapter.kt @@ -123,7 +123,8 @@ class CheckoutAtomParamInputAdapter( useCustomCredential = true, enableTGitCache = enableTGitCache, tGitCacheUrl = tGitCacheUrl, - tGitCacheProxyUrl = tGitCacheProxyUrl + tGitCacheProxyUrl = tGitCacheProxyUrl, + mainRepo = mainRepo ) ).getInputs() @@ -187,7 +188,8 @@ class CheckoutAtomParamInputAdapter( useCustomCredential = true, enableTGitCache = enableTGitCache, tGitCacheUrl = tGitCacheUrl, - tGitCacheProxyUrl = tGitCacheProxyUrl + tGitCacheProxyUrl = tGitCacheProxyUrl, + mainRepo = mainRepo ) ).getInputs() diff --git a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/GitCodeAtomParamInputAdapter.kt b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/GitCodeAtomParamInputAdapter.kt index 749e7c4f..f87a47ff 100644 --- a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/GitCodeAtomParamInputAdapter.kt +++ b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/GitCodeAtomParamInputAdapter.kt @@ -277,7 +277,8 @@ class GitCodeAtomParamInputAdapter( forkRepoAuthInfo = forkRepoAuthInfo, enableTGitCache = enableTGitCache, tGitCacheUrl = tGitCacheUrl, - tGitCacheProxyUrl = tGitCacheProxyUrl + tGitCacheProxyUrl = tGitCacheProxyUrl, + mainRepo = mainRepo ) } } diff --git a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/GitCodeCommandAtomParamInputAdapter.kt b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/GitCodeCommandAtomParamInputAdapter.kt index d45005a7..fb77a60a 100644 --- a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/GitCodeCommandAtomParamInputAdapter.kt +++ b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/service/input/GitCodeCommandAtomParamInputAdapter.kt @@ -190,7 +190,8 @@ class GitCodeCommandAtomParamInputAdapter( forkRepoAuthInfo = forkRepoAuthInfo, enableTGitCache = enableTGitCache, tGitCacheUrl = tGitCacheUrl, - tGitCacheProxyUrl = tGitCacheProxyUrl + tGitCacheProxyUrl = tGitCacheProxyUrl, + mainRepo = mainRepo ) } } From c07799de59c9922159bbb3dbaeca767fcdbcf705 Mon Sep 17 00:00:00 2001 From: hejieehe <904696180@qq.com> Date: Thu, 5 Sep 2024 14:59:16 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat=EF=BC=9A=E6=BA=90=E6=9D=90=E6=96=99?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=BC=98=E5=8C=96=20#10733?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bk/devops/git/core/pojo/api/PipelineBuildMaterial.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/api/PipelineBuildMaterial.kt b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/api/PipelineBuildMaterial.kt index 2950e961..d8267d05 100644 --- a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/api/PipelineBuildMaterial.kt +++ b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/api/PipelineBuildMaterial.kt @@ -40,6 +40,5 @@ data class PipelineBuildMaterial( val newCommitComment: String?, val commitTimes: Int?, val scmType: ScmType?, - val mainRepo: Boolean? = false, - val createTime: Long? = System.currentTimeMillis() / 1000 + val mainRepo: Boolean? = false ) From 08057e1508efa7a6aba44a64d45bd90ab45abb0c Mon Sep 17 00:00:00 2001 From: hejieehe <904696180@qq.com> Date: Wed, 9 Oct 2024 16:47:47 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat=EF=BC=9A=E6=BA=90=E6=9D=90=E6=96=99?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=BC=98=E5=8C=96=20#10733?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bk/devops/git/core/pojo/input/GitCodeAtomParamInput.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeAtomParamInput.kt b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeAtomParamInput.kt index d2c388d0..d475813e 100644 --- a/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeAtomParamInput.kt +++ b/git-checkout-core/src/main/kotlin/com/tencent/bk/devops/git/core/pojo/input/GitCodeAtomParamInput.kt @@ -127,7 +127,7 @@ data class GitCodeAtomParamInput( /** * 是否设置安全目录 */ - val setSafeDirectory: Boolean? = true + val setSafeDirectory: Boolean? = true, /** * 是否为源材料主仓库 */