You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by wa...@apache.org on 2022/09/16 11:23:38 UTC
[incubator-devlake] 02/02: feat: add deployTagPattern for github
This is an automated email from the ASF dual-hosted git repository.
warren pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit de9b7957f08a78717d04c223056046752c3616ac
Author: abeizn <zi...@merico.dev>
AuthorDate: Fri Sep 16 19:06:06 2022 +0800
feat: add deployTagPattern for github
---
plugins/github/tasks/cicd_job_convertor.go | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/plugins/github/tasks/cicd_job_convertor.go b/plugins/github/tasks/cicd_job_convertor.go
index 83c7683b..90c342e1 100644
--- a/plugins/github/tasks/cicd_job_convertor.go
+++ b/plugins/github/tasks/cicd_job_convertor.go
@@ -103,8 +103,10 @@ func ConvertTasks(taskCtx core.SubTaskContext) (err errors.Error) {
FinishedDate: line.CompletedAt,
}
- if deployFlag := deployTagRegexp.FindString(line.Name); deployFlag != "" {
- domainjob.Type = devops.DEPLOYMENT
+ if deployTagRegexp != nil {
+ if deployFlag := deployTagRegexp.FindString(line.Name); deployFlag != "" {
+ domainjob.Type = devops.DEPLOYMENT
+ }
}
if len(tmp) > 0 {
domainjob.PipelineId = fmt.Sprintf("%s:%s:%d:%d", "github", "GithubRun", data.Options.ConnectionId, line.RunID)