You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by zh...@apache.org on 2022/06/08 12:07:08 UTC

[incubator-devlake] branch release-v0.11 updated (0677f875 -> e79d6e31)

This is an automated email from the ASF dual-hosted git repository.

zhangliang2022 pushed a change to branch release-v0.11
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


    from 0677f875 fix(gitlab): delete gitlab child pipeline subtask (#2120)
     new a17e2f50 fix: golangci-lint not works in CI (#2084)
     new f684d9ba fix: add .rat-excludes file
     new 3b103f16 fix: add Apache license header
     new 55512d6b fix: resolve conflit
     new a9bca32f Merge branch 'release-v0.11' of github.com:apache/incubator-devlake into release-v0.11
     new e79d6e31 fix: add ASF header to webpack.cofnig.js

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/golangci-lint.yml                |  4 +-
 .golangci.yaml                                     |  3 +-
 .rat-excludes                                      | 44 ++++++++++++++++++++++
 Dockerfile                                         | 23 +++++------
 Makefile                                           |  3 ++
 config-ui/Dockerfile                               | 25 ++++++++++++
 config-ui/src/index-production.html                | 17 +++++++++
 config-ui/src/index.html                           | 16 ++++++++
 config-ui/webpack.config.js                        | 17 +++++++++
 config-ui/webpack.production.config.js             | 18 +++++++++
 config/config_test.go                              | 17 +++++++++
 grafana/Dockerfile                                 | 25 ++++++++++++
 plugins/gitlab/models/issue.go                     | 17 +++++++++
 plugins/gitlab/models/issue_label.go               | 21 ++++++++++-
 .../migrationscripts/update_schemas20220525.go     | 10 ++---
 plugins/gitlab/tasks/issue_collector.go            | 19 +++++++++-
 plugins/gitlab/tasks/issue_convertor.go            | 17 +++++++++
 plugins/gitlab/tasks/issue_extractor.go            | 18 +++++++++
 plugins/gitlab/tasks/issue_label_convertor.go      | 17 +++++++++
 plugins/gitlab/tasks/shared.go                     |  2 +-
 plugins/helper/api_collector.go                    |  4 +-
 plugins/helper/data_convertor_test.go              | 17 +++++++++
 plugins/helper/default_task_context.go             |  4 +-
 .../models/migrationscripts/archived/changelog.go  |  8 ++--
 .../migrationscripts/updateSchemas20220527.go      |  2 +-
 plugins/jira/models/response_type.go               |  5 +--
 .../tasks/refs_pr_cherry_pick_calculator.go        |  2 +-
 plugins/tapd/models/bug_custom_field.go            | 17 +++++++++
 .../migrationscripts/archived/bug_custom_field.go  | 17 +++++++++
 .../migrationscripts/archived/story_category.go    | 17 +++++++++
 .../archived/story_custom_field.go                 | 17 +++++++++
 .../migrationscripts/archived/task_custom_field.go | 17 +++++++++
 .../migrationscripts/update_schemas20220531.go     |  2 +-
 plugins/tapd/models/story_category.go              | 17 +++++++++
 plugins/tapd/models/story_custom_field.go          | 17 +++++++++
 plugins/tapd/models/task_custom_field.go           | 17 +++++++++
 plugins/tapd/tapd.go                               |  5 ++-
 plugins/tapd/tasks/bug_changelog_converter.go      |  4 +-
 38 files changed, 480 insertions(+), 42 deletions(-)
 create mode 100644 .rat-excludes


[incubator-devlake] 02/06: fix: add .rat-excludes file

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangliang2022 pushed a commit to branch release-v0.11
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit f684d9bafe3b69158eead1121dcead336895bc8e
Author: zhangliang <li...@merico.dev>
AuthorDate: Wed Jun 8 09:48:16 2022 +0800

    fix: add .rat-excludes file
---
 .rat-excludes | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/.rat-excludes b/.rat-excludes
new file mode 100644
index 00000000..069ca43d
--- /dev/null
+++ b/.rat-excludes
@@ -0,0 +1,44 @@
+.github/*
+.gitignore
+.gitattributes
+.gitrepo
+.eslintrc
+.eslintignore
+.rat-excludes
+.stylelintignore
+.stylelintrc
+.*log
+.*conf
+.travis.yml
+dist
+vendor
+.idea
+.*sql
+.*png
+.*svg
+.*csv
+.*md5
+.*zip
+.*lock
+.*sh
+.*babelrc
+.*editorconfig
+.*empty
+.*tpl
+logs
+.gitmodules
+scripts/*
+go.mod
+go.sum
+.*json
+.*md
+.*yaml
+.*yml
+.*scss
+rat-results.txt
+.*helmignore
+.*NOTES.txt
+.*dockerignore
+.*Dockerfile
+.*env.example
+.git


[incubator-devlake] 01/06: fix: golangci-lint not works in CI (#2084)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangliang2022 pushed a commit to branch release-v0.11
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit a17e2f50bae90bf8af458aed8d2db118e9fb54db
Author: Ji Bin <ma...@live.com>
AuthorDate: Mon Jun 6 21:50:03 2022 +0800

    fix: golangci-lint not works in CI (#2084)
    
    - run golangci-lint in lake-builder to ensure the toolchain is same as builder
    - fix some header missing errors
    - add //nolint and TODO for some errors(4 in total)
    - enable gofmt in golangci-lint and add `make fmt` for format the whole project
    
    fixes: #2077
    
    Signed-off-by: Ji Bin <ma...@live.com>
---
 .github/workflows/golangci-lint.yml                 |  4 +---
 .golangci.yaml                                      |  3 ++-
 Makefile                                            |  3 +++
 config/config_test.go                               | 17 +++++++++++++++++
 plugins/gitlab/models/issue.go                      | 17 +++++++++++++++++
 plugins/gitlab/models/issue_label.go                | 21 +++++++++++++++++++--
 .../migrationscripts/update_schemas20220525.go      | 10 +++++-----
 plugins/gitlab/tasks/issue_collector.go             | 19 ++++++++++++++++++-
 plugins/gitlab/tasks/issue_convertor.go             | 17 +++++++++++++++++
 plugins/gitlab/tasks/issue_extractor.go             | 18 ++++++++++++++++++
 plugins/gitlab/tasks/issue_label_convertor.go       | 17 +++++++++++++++++
 plugins/gitlab/tasks/shared.go                      |  2 +-
 plugins/helper/api_collector.go                     |  4 ++--
 plugins/helper/data_convertor_test.go               | 17 +++++++++++++++++
 plugins/helper/default_task_context.go              |  4 ++--
 .../models/migrationscripts/archived/changelog.go   |  8 ++++----
 .../migrationscripts/updateSchemas20220527.go       |  2 +-
 plugins/jira/models/response_type.go                |  5 ++---
 .../refdiff/tasks/refs_pr_cherry_pick_calculator.go |  2 +-
 plugins/tapd/models/bug_custom_field.go             | 17 +++++++++++++++++
 .../migrationscripts/archived/bug_custom_field.go   | 17 +++++++++++++++++
 .../migrationscripts/archived/story_category.go     | 17 +++++++++++++++++
 .../migrationscripts/archived/story_custom_field.go | 17 +++++++++++++++++
 .../migrationscripts/archived/task_custom_field.go  | 17 +++++++++++++++++
 .../migrationscripts/update_schemas20220531.go      |  2 +-
 plugins/tapd/models/story_category.go               | 17 +++++++++++++++++
 plugins/tapd/models/story_custom_field.go           | 17 +++++++++++++++++
 plugins/tapd/models/task_custom_field.go            | 17 +++++++++++++++++
 plugins/tapd/tapd.go                                |  5 +++--
 plugins/tapd/tasks/bug_changelog_converter.go       |  4 ++--
 30 files changed, 306 insertions(+), 31 deletions(-)

diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml
index acf1580b..856344b7 100644
--- a/.github/workflows/golangci-lint.yml
+++ b/.github/workflows/golangci-lint.yml
@@ -10,10 +10,8 @@ jobs:
   golangci:
     name: lint
     runs-on: ubuntu-latest
+    container: mericodev/lake-builder:latest
     steps:
-      - uses: actions/setup-go@v3
-        with:
-          go-version: '1.17.x'
       - uses: actions/checkout@v3
       - name: Cache golangci-lint
         id: cache-golangci-lint
diff --git a/.golangci.yaml b/.golangci.yaml
index 4aa61338..6b9663b6 100644
--- a/.golangci.yaml
+++ b/.golangci.yaml
@@ -31,6 +31,7 @@ linters:
 #    - exhaustive
 #    - funlen
 #    - goconst
+    - gofmt
     - goheader
 #    - goimports
 #    - gomnd
@@ -62,4 +63,4 @@ run:
   issues-exit-code: 2
   # Include test files or not.
   # Default: true
-  tests: false
\ No newline at end of file
+  tests: false
diff --git a/Makefile b/Makefile
index 561c6170..65345316 100644
--- a/Makefile
+++ b/Makefile
@@ -68,6 +68,9 @@ real-e2e-test:
 lint:
 	golangci-lint run
 
+fmt:
+	find -name \*.go | xargs gofmt -w -l
+
 clean:
 	@rm -rf bin
 
diff --git a/config/config_test.go b/config/config_test.go
index 50a22c1a..6efe9183 100644
--- a/config/config_test.go
+++ b/config/config_test.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package config
 
 import (
diff --git a/plugins/gitlab/models/issue.go b/plugins/gitlab/models/issue.go
index 3fed54e8..2432824d 100644
--- a/plugins/gitlab/models/issue.go
+++ b/plugins/gitlab/models/issue.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package models
 
 import (
diff --git a/plugins/gitlab/models/issue_label.go b/plugins/gitlab/models/issue_label.go
index 41ad0852..17441766 100644
--- a/plugins/gitlab/models/issue_label.go
+++ b/plugins/gitlab/models/issue_label.go
@@ -1,7 +1,24 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package models
 
 import (
-"github.com/apache/incubator-devlake/models/common"
+	"github.com/apache/incubator-devlake/models/common"
 )
 
 // Please note that Issue Labels can also apply to Pull Requests.
@@ -13,6 +30,6 @@ type GitlabIssueLabel struct {
 	common.NoPKModel
 }
 
-func (GitlabIssueLabel) TableName() string{
+func (GitlabIssueLabel) TableName() string {
 	return "_tool_gitlab_issue_labels"
 }
diff --git a/plugins/gitlab/models/migrationscripts/update_schemas20220525.go b/plugins/gitlab/models/migrationscripts/update_schemas20220525.go
index 694d1b93..5df572bd 100644
--- a/plugins/gitlab/models/migrationscripts/update_schemas20220525.go
+++ b/plugins/gitlab/models/migrationscripts/update_schemas20220525.go
@@ -45,27 +45,27 @@ type GitlabIssue20220525 struct {
 	GitlabUpdatedAt time.Time `gorm:"index"`
 	Severity        string    `gorm:"type:varchar(255)"`
 	Component       string    `gorm:"type:varchar(255)"`
-	TimeEstimate 	int64
-	TotalTimeSpent 	int64
+	TimeEstimate    int64
+	TotalTimeSpent  int64
 	archived.NoPKModel
 }
+
 func (GitlabIssue20220525) TableName() string {
 	return "_tool_gitlab_issues"
 }
 
-
 type GitlabIssueLabel20220525 struct {
 	IssueId   int    `gorm:"primaryKey;autoIncrement:false"`
 	LabelName string `gorm:"primaryKey;type:varchar(255)"`
 	archived.NoPKModel
 }
 
-func (GitlabIssueLabel20220525) TableName() string{
+func (GitlabIssueLabel20220525) TableName() string {
 	return "_tool_gitlab_issue_labels"
 }
 
 func (*UpdateSchemas20220525) Up(ctx context.Context, db *gorm.DB) error {
-	err := db.Migrator().AutoMigrate(GitlabIssue20220525{},GitlabIssueLabel20220525{})
+	err := db.Migrator().AutoMigrate(GitlabIssue20220525{}, GitlabIssueLabel20220525{})
 	if err != nil {
 		return err
 	}
diff --git a/plugins/gitlab/tasks/issue_collector.go b/plugins/gitlab/tasks/issue_collector.go
index f5f4d5a6..15342648 100644
--- a/plugins/gitlab/tasks/issue_collector.go
+++ b/plugins/gitlab/tasks/issue_collector.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package tasks
 
 import (
@@ -56,7 +73,7 @@ func CollectApiIssues(taskCtx core.SubTaskContext) error {
 				set of data to be process, for example, we process JiraIssues by Board
 			*/
 			Params: GitlabApiParams{
-				ProjectId:  data.Options.ProjectId,
+				ProjectId: data.Options.ProjectId,
 			},
 			/*
 				Table store raw data
diff --git a/plugins/gitlab/tasks/issue_convertor.go b/plugins/gitlab/tasks/issue_convertor.go
index 3133dea9..2101d328 100644
--- a/plugins/gitlab/tasks/issue_convertor.go
+++ b/plugins/gitlab/tasks/issue_convertor.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package tasks
 
 import (
diff --git a/plugins/gitlab/tasks/issue_extractor.go b/plugins/gitlab/tasks/issue_extractor.go
index d4870483..4be8ed80 100644
--- a/plugins/gitlab/tasks/issue_extractor.go
+++ b/plugins/gitlab/tasks/issue_extractor.go
@@ -1,7 +1,25 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package tasks
 
 import (
 	"encoding/json"
+
 	"github.com/apache/incubator-devlake/plugins/core"
 
 	"github.com/apache/incubator-devlake/plugins/gitlab/models"
diff --git a/plugins/gitlab/tasks/issue_label_convertor.go b/plugins/gitlab/tasks/issue_label_convertor.go
index fdbad910..4556ac23 100644
--- a/plugins/gitlab/tasks/issue_label_convertor.go
+++ b/plugins/gitlab/tasks/issue_label_convertor.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package tasks
 
 import (
diff --git a/plugins/gitlab/tasks/shared.go b/plugins/gitlab/tasks/shared.go
index ae40ade5..3c5ffb1a 100644
--- a/plugins/gitlab/tasks/shared.go
+++ b/plugins/gitlab/tasks/shared.go
@@ -97,7 +97,7 @@ func GetMergeRequestsIterator(taskCtx core.SubTaskContext) (*helper.CursorIterat
 	db := taskCtx.GetDb()
 	data := taskCtx.GetData().(*GitlabTaskData)
 	cursor, err := db.Model(&models.GitlabMergeRequest{}).Select("gitlab_id, iid").
-	Where("project_id = ?", data.Options.ProjectId).Select("gitlab_id,iid").Rows()
+		Where("project_id = ?", data.Options.ProjectId).Select("gitlab_id,iid").Rows()
 	if err != nil {
 		return nil, err
 	}
diff --git a/plugins/helper/api_collector.go b/plugins/helper/api_collector.go
index 447b5eb9..23cbb099 100644
--- a/plugins/helper/api_collector.go
+++ b/plugins/helper/api_collector.go
@@ -185,7 +185,7 @@ func (collector *ApiCollector) Execute() error {
 				go func() {
 					defer func() {
 						wg.Done()
-						recover()
+						recover() //nolint TODO: check the return and do log if not nil
 					}()
 					e := collector.exec(input)
 					// propagate error
@@ -416,7 +416,7 @@ func (collector *ApiCollector) handleResponseWithPages(reqData *RequestData) Api
 		go func() {
 			defer func() {
 				collector.args.ApiClient.Done()
-				recover()
+				recover() //nolint TODO: check the return and do log if not nil
 			}()
 			for page := 2; page <= totalPages; page++ {
 				reqDataTemp := &RequestData{
diff --git a/plugins/helper/data_convertor_test.go b/plugins/helper/data_convertor_test.go
index 01843d26..3a4d84f7 100644
--- a/plugins/helper/data_convertor_test.go
+++ b/plugins/helper/data_convertor_test.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package helper
 
 import (
diff --git a/plugins/helper/default_task_context.go b/plugins/helper/default_task_context.go
index b667b82b..f49e2534 100644
--- a/plugins/helper/default_task_context.go
+++ b/plugins/helper/default_task_context.go
@@ -188,14 +188,14 @@ func (c *DefaultTaskContext) SubTaskContext(subtask string) (core.SubTaskContext
 	if run, ok := c.subtasks[subtask]; ok {
 		if run {
 			// now, create a sub task context if it didn't exist
-			c.mu.Lock()
+			c.defaultExecContext.mu.Lock()
 			if c.subtaskCtxs[subtask] == nil {
 				c.subtaskCtxs[subtask] = &DefaultSubTaskContext{
 					c.defaultExecContext.fork(subtask),
 					c,
 				}
 			}
-			c.mu.Unlock()
+			c.defaultExecContext.mu.Unlock()
 			return c.subtaskCtxs[subtask], nil
 		}
 		// subtasks is skipped
diff --git a/plugins/jira/models/migrationscripts/archived/changelog.go b/plugins/jira/models/migrationscripts/archived/changelog.go
index 11e05ab7..4b87297b 100644
--- a/plugins/jira/models/migrationscripts/archived/changelog.go
+++ b/plugins/jira/models/migrationscripts/archived/changelog.go
@@ -45,10 +45,10 @@ type JiraChangelogItem struct {
 	Field       string `gorm:"primaryKey"`
 	FieldType   string
 	FieldId     string
-	From         string
-	FromString   string
-	To           string
-	ToString     string
+	From        string
+	FromString  string
+	To          string
+	ToString    string
 }
 
 func (JiraChangelog) TableName() string {
diff --git a/plugins/jira/models/migrationscripts/updateSchemas20220527.go b/plugins/jira/models/migrationscripts/updateSchemas20220527.go
index 145498dc..ab9d2a27 100644
--- a/plugins/jira/models/migrationscripts/updateSchemas20220527.go
+++ b/plugins/jira/models/migrationscripts/updateSchemas20220527.go
@@ -47,7 +47,7 @@ func (JiraChangelogItem20220527) TableName() string {
 type UpdateSchemas20220527 struct{}
 
 func (*UpdateSchemas20220527) Up(ctx context.Context, db *gorm.DB) error {
-	
+
 	err := db.Migrator().RenameColumn(jiraArchived.JiraChangelogItem{}, "from", "from_value")
 	if err != nil {
 		return err
diff --git a/plugins/jira/models/response_type.go b/plugins/jira/models/response_type.go
index a1a714f5..0fcd4236 100644
--- a/plugins/jira/models/response_type.go
+++ b/plugins/jira/models/response_type.go
@@ -41,11 +41,10 @@ type ApiMyselfResponse struct {
 	DisplayName string
 }
 
-func (JiraServerInfo) TableName() string{
+func (JiraServerInfo) TableName() string {
 	return "_tool_jira_server_infos"
 }
 
-func (ApiMyselfResponse) TableName() string{
+func (ApiMyselfResponse) TableName() string {
 	return "_tool_api_myself_responses"
 }
-
diff --git a/plugins/refdiff/tasks/refs_pr_cherry_pick_calculator.go b/plugins/refdiff/tasks/refs_pr_cherry_pick_calculator.go
index 602063d8..e5f2b0b4 100644
--- a/plugins/refdiff/tasks/refs_pr_cherry_pick_calculator.go
+++ b/plugins/refdiff/tasks/refs_pr_cherry_pick_calculator.go
@@ -44,7 +44,7 @@ func CalculatePrCherryPick(taskCtx core.SubTaskContext) error {
 	ctx := taskCtx.GetContext()
 	db := taskCtx.GetDb()
 	var prTitleRegex *regexp.Regexp
-	
+
 	prTitlePattern := taskCtx.GetConfig("GITHUB_PR_TITLE_PATTERN")
 	if len(prTitlePattern) > 0 {
 		prTitleRegex = regexp.MustCompile(prTitlePattern)
diff --git a/plugins/tapd/models/bug_custom_field.go b/plugins/tapd/models/bug_custom_field.go
index aca33127..b0005ef2 100644
--- a/plugins/tapd/models/bug_custom_field.go
+++ b/plugins/tapd/models/bug_custom_field.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package models
 
 import "github.com/apache/incubator-devlake/models/common"
diff --git a/plugins/tapd/models/migrationscripts/archived/bug_custom_field.go b/plugins/tapd/models/migrationscripts/archived/bug_custom_field.go
index 2dbb8677..1027721e 100644
--- a/plugins/tapd/models/migrationscripts/archived/bug_custom_field.go
+++ b/plugins/tapd/models/migrationscripts/archived/bug_custom_field.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package archived
 
 import "github.com/apache/incubator-devlake/models/common"
diff --git a/plugins/tapd/models/migrationscripts/archived/story_category.go b/plugins/tapd/models/migrationscripts/archived/story_category.go
index d85519e8..3e99c8ac 100644
--- a/plugins/tapd/models/migrationscripts/archived/story_category.go
+++ b/plugins/tapd/models/migrationscripts/archived/story_category.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package archived
 
 import (
diff --git a/plugins/tapd/models/migrationscripts/archived/story_custom_field.go b/plugins/tapd/models/migrationscripts/archived/story_custom_field.go
index 0c951804..79360672 100644
--- a/plugins/tapd/models/migrationscripts/archived/story_custom_field.go
+++ b/plugins/tapd/models/migrationscripts/archived/story_custom_field.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package archived
 
 import "github.com/apache/incubator-devlake/models/common"
diff --git a/plugins/tapd/models/migrationscripts/archived/task_custom_field.go b/plugins/tapd/models/migrationscripts/archived/task_custom_field.go
index dfd906db..afc20788 100644
--- a/plugins/tapd/models/migrationscripts/archived/task_custom_field.go
+++ b/plugins/tapd/models/migrationscripts/archived/task_custom_field.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package archived
 
 import "github.com/apache/incubator-devlake/models/common"
diff --git a/plugins/tapd/models/migrationscripts/update_schemas20220531.go b/plugins/tapd/models/migrationscripts/update_schemas20220531.go
index 917691a8..0eb4f3a3 100644
--- a/plugins/tapd/models/migrationscripts/update_schemas20220531.go
+++ b/plugins/tapd/models/migrationscripts/update_schemas20220531.go
@@ -110,4 +110,4 @@ func (*UpdateSchemas20220531) Name() string {
 
 func (*UpdateSchemas20220531) Owner() string {
 	return "tapd"
-}
\ No newline at end of file
+}
diff --git a/plugins/tapd/models/story_category.go b/plugins/tapd/models/story_category.go
index 3c9ba2a1..085818f6 100644
--- a/plugins/tapd/models/story_category.go
+++ b/plugins/tapd/models/story_category.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package models
 
 import (
diff --git a/plugins/tapd/models/story_custom_field.go b/plugins/tapd/models/story_custom_field.go
index 4fd66834..2d54e588 100644
--- a/plugins/tapd/models/story_custom_field.go
+++ b/plugins/tapd/models/story_custom_field.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package models
 
 import "github.com/apache/incubator-devlake/models/common"
diff --git a/plugins/tapd/models/task_custom_field.go b/plugins/tapd/models/task_custom_field.go
index b5008565..62b6f101 100644
--- a/plugins/tapd/models/task_custom_field.go
+++ b/plugins/tapd/models/task_custom_field.go
@@ -1,3 +1,20 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
 package models
 
 import "github.com/apache/incubator-devlake/models/common"
diff --git a/plugins/tapd/tapd.go b/plugins/tapd/tapd.go
index e20194be..07d4e370 100644
--- a/plugins/tapd/tapd.go
+++ b/plugins/tapd/tapd.go
@@ -19,9 +19,10 @@ package main
 
 import (
 	"fmt"
+	"time"
+
 	"github.com/apache/incubator-devlake/config"
 	"github.com/apache/incubator-devlake/logger"
-	"time"
 
 	"github.com/apache/incubator-devlake/migration"
 	"github.com/apache/incubator-devlake/models/domainlayer/didgen"
@@ -219,7 +220,7 @@ func main() {
 			panic(err)
 		}
 		wsList := make([]*models.TapdWorkspace, 0)
-		err = db.Find(&wsList, "parent_id = ?", 59169984).Error
+		err = db.Find(&wsList, "parent_id = ?", 59169984).Error //nolint TODO: fix the unused err
 		for _, v := range wsList {
 			*workspaceId = v.ID
 			runner.DirectRun(c, args, PluginEntry, map[string]interface{}{
diff --git a/plugins/tapd/tasks/bug_changelog_converter.go b/plugins/tapd/tasks/bug_changelog_converter.go
index 87cd5fd8..8f430262 100644
--- a/plugins/tapd/tasks/bug_changelog_converter.go
+++ b/plugins/tapd/tasks/bug_changelog_converter.go
@@ -87,8 +87,8 @@ func ConvertBugChangelog(taskCtx core.SubTaskContext) error {
 				AuthorName:  cl.Author,
 				FieldId:     cl.Field,
 				FieldName:   cl.Field,
-				FromValue:        cl.ValueBeforeParsed,
-				ToValue:          cl.ValueAfterParsed,
+				FromValue:   cl.ValueBeforeParsed,
+				ToValue:     cl.ValueAfterParsed,
 				CreatedDate: cl.Created,
 			}
 


[incubator-devlake] 06/06: fix: add ASF header to webpack.cofnig.js

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangliang2022 pushed a commit to branch release-v0.11
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit e79d6e313d5a0055d1366b27a67e35c299498809
Author: zhangliang <li...@merico.dev>
AuthorDate: Wed Jun 8 20:06:59 2022 +0800

    fix: add ASF header to webpack.cofnig.js
---
 config-ui/webpack.config.js            | 17 +++++++++++++++++
 config-ui/webpack.production.config.js | 18 ++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/config-ui/webpack.config.js b/config-ui/webpack.config.js
index 5a253b25..9c90b952 100644
--- a/config-ui/webpack.config.js
+++ b/config-ui/webpack.config.js
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 // DEVELOPMENT ONLY WEBPACK CONFIG
 const path = require('path')
 const webpack = require('webpack')
diff --git a/config-ui/webpack.production.config.js b/config-ui/webpack.production.config.js
index a8c34ae9..04334fa1 100644
--- a/config-ui/webpack.production.config.js
+++ b/config-ui/webpack.production.config.js
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 /* eslint-disable import/no-extraneous-dependencies */
 const path = require('path')
 const webpack = require('webpack')


[incubator-devlake] 04/06: fix: resolve conflit

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangliang2022 pushed a commit to branch release-v0.11
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 55512d6ba9e2597b2938df73e955a3ba92f6979e
Author: zhangliang <li...@merico.dev>
AuthorDate: Wed Jun 8 19:15:28 2022 +0800

    fix: resolve conflit
---
 Dockerfile           | 23 ++++++++++++-----------
 config-ui/Dockerfile | 25 +++++++++++++++++++++++++
 grafana/Dockerfile   | 25 +++++++++++++++++++++++++
 3 files changed, 62 insertions(+), 11 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 6060ac25..7600f01b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,7 +13,17 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-FROM mericodev/lake-builder:0.0.4 as builder
+#Apache DevLake is an effort undergoing incubation at The Apache Software
+#Foundation (ASF), sponsored by the Apache Incubator PMC.
+#
+#Incubation is required of all newly accepted projects until a further review
+#indicates that the infrastructure, communications, and decision making process
+#have stabilized in a manner consistent with other successful ASF projects.
+#
+#While incubation status is not necessarily a reflection of the completeness or stability of the code,
+#it does indicate that the project has yet to be fully endorsed by the ASF.
+
+FROM mericodev/lake-builder:0.0.5 as builder
 
 # docker build --build-arg GOPROXY=https://goproxy.io,direct -t mericodev/lake .
 ARG GOPROXY=
@@ -27,16 +37,7 @@ ENV GOBIN=/app/bin
 
 RUN make clean && make all
 
-FROM --platform=linux/amd64 alpine:3.15
-RUN apk add --no-cache musl-dev libgit2-dev libffi-dev \
-    && apk add --no-cache gcc
-
-ENV PYTHONUNBUFFERED=1
-RUN apk add --update --no-cache python3-dev && ln -sf python3 /usr/bin/python
-RUN python3 -m ensurepip
-RUN pip3 install --no-cache --upgrade pip setuptools
-RUN pip3 install dbt-mysql
-RUN apk add --no-cache tar
+FROM --platform=linux/amd64 mericodev/alpine-dbt-mysql:0.0.1
 
 EXPOSE 8080
 
diff --git a/config-ui/Dockerfile b/config-ui/Dockerfile
index 7e73016b..eccd50f4 100644
--- a/config-ui/Dockerfile
+++ b/config-ui/Dockerfile
@@ -1,3 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#Apache DevLake is an effort undergoing incubation at The Apache Software
+#Foundation (ASF), sponsored by the Apache Incubator PMC.
+#
+#Incubation is required of all newly accepted projects until a further review
+#indicates that the infrastructure, communications, and decision making process
+#have stabilized in a manner consistent with other successful ASF projects.
+#
+#While incubation status is not necessarily a reflection of the completeness or stability of the code,
+#it does indicate that the project has yet to be fully endorsed by the ASF.
+
 FROM node:16 as builder
 WORKDIR /home/node/code
 COPY package.json /home/node/code
diff --git a/grafana/Dockerfile b/grafana/Dockerfile
index 9b37197b..096821e0 100644
--- a/grafana/Dockerfile
+++ b/grafana/Dockerfile
@@ -1,3 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#Apache DevLake is an effort undergoing incubation at The Apache Software
+#Foundation (ASF), sponsored by the Apache Incubator PMC.
+#
+#Incubation is required of all newly accepted projects until a further review
+#indicates that the infrastructure, communications, and decision making process
+#have stabilized in a manner consistent with other successful ASF projects.
+#
+#While incubation status is not necessarily a reflection of the completeness or stability of the code,
+#it does indicate that the project has yet to be fully endorsed by the ASF.
+
 FROM grafana/grafana:8.0.6
 COPY ./provisioning/dashboards /etc/grafana/provisioning/dashboards
 COPY ./provisioning/datasources /etc/grafana/provisioning/datasources


[incubator-devlake] 05/06: Merge branch 'release-v0.11' of github.com:apache/incubator-devlake into release-v0.11

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangliang2022 pushed a commit to branch release-v0.11
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit a9bca32f18ab497add26b885d2535a7cecab7e32
Merge: 55512d6b 0677f875
Author: zhangliang <li...@merico.dev>
AuthorDate: Wed Jun 8 19:49:00 2022 +0800

    Merge branch 'release-v0.11' of github.com:apache/incubator-devlake into release-v0.11

 plugins/gitlab/impl/impl.go                |  2 -
 plugins/gitlab/tasks/pipeline_collector.go | 33 -----------------
 plugins/gitlab/tasks/pipeline_extractor.go | 59 ------------------------------
 3 files changed, 94 deletions(-)


[incubator-devlake] 03/06: fix: add Apache license header

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangliang2022 pushed a commit to branch release-v0.11
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 3b103f16ed0556234f585c93fae8b1cc04fe95f9
Author: zhangliang <li...@merico.dev>
AuthorDate: Wed Jun 8 09:49:01 2022 +0800

    fix: add Apache license header
---
 config-ui/src/index-production.html | 17 +++++++++++++++++
 config-ui/src/index.html            | 16 ++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/config-ui/src/index-production.html b/config-ui/src/index-production.html
index 5f439346..d8945201 100644
--- a/config-ui/src/index-production.html
+++ b/config-ui/src/index-production.html
@@ -1,3 +1,20 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
 <!--
 ____  _______     __  _        _    _  _______ 
 |  _ \| ____\ \   / / | |      / \  | |/ / ____|
diff --git a/config-ui/src/index.html b/config-ui/src/index.html
index 222aaec1..71cb3383 100644
--- a/config-ui/src/index.html
+++ b/config-ui/src/index.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!DOCTYPE html>
   <html lang="en">
   <head>