Skip to content

Commit

Permalink
feat: 当 mr 触发时, webhookinfo 中增加 mr 的源分支 和 id TencentBlueKing#6153
Browse files Browse the repository at this point in the history
  • Loading branch information
mingshewhe committed Feb 21, 2022
1 parent 5002465 commit fac9552
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ data class WebhookInfo(
val webhookMessage: String?,
val webhookCommitId: String?,
// 合并后commitId
val webhookMergeCommitSha: String?
val webhookMergeCommitSha: String?,
// 源分支
val webhookSourceBranch: String?
)
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import com.tencent.devops.common.redis.RedisOperation
import com.tencent.devops.common.service.trace.TraceTag
import com.tencent.devops.common.webhook.pojo.code.BK_REPO_GIT_WEBHOOK_EVENT_TYPE
import com.tencent.devops.common.webhook.pojo.code.BK_REPO_GIT_WEBHOOK_MR_MERGE_COMMIT_SHA
import com.tencent.devops.common.webhook.pojo.code.BK_REPO_GIT_WEBHOOK_MR_SOURCE_BRANCH
import com.tencent.devops.common.webhook.pojo.code.BK_REPO_WEBHOOK_REPO_URL
import com.tencent.devops.common.webhook.pojo.code.PIPELINE_WEBHOOK_BRANCH
import com.tencent.devops.common.webhook.pojo.code.PIPELINE_WEBHOOK_COMMIT_MESSAGE
Expand Down Expand Up @@ -1144,7 +1145,8 @@ class PipelineRuntimeService @Autowired constructor(
params[PIPELINE_WEBHOOK_EVENT_TYPE] as String?
},
webhookCommitId = params[PIPELINE_WEBHOOK_REVISION] as String?,
webhookMergeCommitSha = params[BK_REPO_GIT_WEBHOOK_MR_MERGE_COMMIT_SHA] as String?
webhookMergeCommitSha = params[BK_REPO_GIT_WEBHOOK_MR_MERGE_COMMIT_SHA] as String?,
webhookSourceBranch = params[BK_REPO_GIT_WEBHOOK_MR_SOURCE_BRANCH] as String?
),
formatted = false
)
Expand Down

0 comments on commit fac9552

Please sign in to comment.