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/07/22 07:45:57 UTC
[incubator-devlake] branch main updated: fix: accounts name (#2579)
This is an automated email from the ASF dual-hosted git repository.
zhangliang2022 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 16666ba8 fix: accounts name (#2579)
16666ba8 is described below
commit 16666ba8a06281720a7a17c79f069d4992711830
Author: abeizn <10...@users.noreply.github.com>
AuthorDate: Fri Jul 22 15:45:54 2022 +0800
fix: accounts name (#2579)
---
plugins/github/e2e/account_test.go | 2 +-
plugins/github/impl/impl.go | 4 ++--
plugins/github/tasks/account_collector.go | 8 ++++----
plugins/github/tasks/account_extractor.go | 4 ++--
plugins/gitlab/e2e/account_test.go | 4 ++--
plugins/gitlab/impl/impl.go | 6 +++---
plugins/gitlab/tasks/account_collector.go | 2 +-
plugins/gitlab/tasks/account_convertor.go | 2 +-
plugins/gitlab/tasks/account_extractor.go | 2 +-
9 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/plugins/github/e2e/account_test.go b/plugins/github/e2e/account_test.go
index 21232aa7..5619de28 100644
--- a/plugins/github/e2e/account_test.go
+++ b/plugins/github/e2e/account_test.go
@@ -49,7 +49,7 @@ func TestAccountDataFlow(t *testing.T) {
// verify extraction
dataflowTester.FlushTabler(&models.GithubAccount{})
- dataflowTester.Subtask(tasks.ExtractAccountMeta, taskData)
+ dataflowTester.Subtask(tasks.ExtractAccountsMeta, taskData)
dataflowTester.VerifyTableWithOptions(&models.GithubAccount{}, e2ehelper.TableOptions{
CSVRelPath: "./snapshot_tables/_tool_github_account.csv",
IgnoreTypes: []interface{}{common.NoPKModel{}},
diff --git a/plugins/github/impl/impl.go b/plugins/github/impl/impl.go
index 35c8a42c..56c0a16f 100644
--- a/plugins/github/impl/impl.go
+++ b/plugins/github/impl/impl.go
@@ -74,8 +74,8 @@ func (plugin Github) SubTaskMetas() []core.SubTaskMeta {
tasks.ExtractApiCommitStatsMeta,
tasks.CollectMilestonesMeta,
tasks.ExtractMilestonesMeta,
- tasks.CollectAccountMeta,
- tasks.ExtractAccountMeta,
+ tasks.CollectAccountsMeta,
+ tasks.ExtractAccountsMeta,
tasks.CollectAccountOrgMeta,
tasks.ExtractAccountOrgMeta,
tasks.EnrichPullRequestIssuesMeta,
diff --git a/plugins/github/tasks/account_collector.go b/plugins/github/tasks/account_collector.go
index bc39c315..fbeaa279 100644
--- a/plugins/github/tasks/account_collector.go
+++ b/plugins/github/tasks/account_collector.go
@@ -37,7 +37,7 @@ type SimpleAccount struct {
Login string
}
-func CollectAccount(taskCtx core.SubTaskContext) error {
+func CollectAccounts(taskCtx core.SubTaskContext) error {
db := taskCtx.GetDal()
data := taskCtx.GetData().(*GithubTaskData)
@@ -89,9 +89,9 @@ func CollectAccount(taskCtx core.SubTaskContext) error {
return collector.Execute()
}
-var CollectAccountMeta = core.SubTaskMeta{
- Name: "collectAccount",
- EntryPoint: CollectAccount,
+var CollectAccountsMeta = core.SubTaskMeta{
+ Name: "collectAccounts",
+ EntryPoint: CollectAccounts,
EnabledByDefault: true,
Description: "Collect accounts data from Github api",
DomainTypes: []string{core.DOMAIN_TYPE_CROSS},
diff --git a/plugins/github/tasks/account_extractor.go b/plugins/github/tasks/account_extractor.go
index 26fccbb9..98e94d2d 100644
--- a/plugins/github/tasks/account_extractor.go
+++ b/plugins/github/tasks/account_extractor.go
@@ -26,8 +26,8 @@ import (
"github.com/apache/incubator-devlake/plugins/helper"
)
-var ExtractAccountMeta = core.SubTaskMeta{
- Name: "ExtractAccounts",
+var ExtractAccountsMeta = core.SubTaskMeta{
+ Name: "extractAccounts",
EntryPoint: ExtractAccounts,
EnabledByDefault: true,
Description: "Extract raw account data into tool layer table github_accounts",
diff --git a/plugins/gitlab/e2e/account_test.go b/plugins/gitlab/e2e/account_test.go
index 22948b0b..644c621e 100644
--- a/plugins/gitlab/e2e/account_test.go
+++ b/plugins/gitlab/e2e/account_test.go
@@ -46,7 +46,7 @@ func TestGitlabAccountDataFlow(t *testing.T) {
// verify extraction
dataflowTester.FlushTabler(&models.GitlabAccount{})
- dataflowTester.Subtask(tasks.ExtractAccountMeta, taskData)
+ dataflowTester.Subtask(tasks.ExtractAccountsMeta, taskData)
dataflowTester.VerifyTable(
models.GitlabAccount{},
fmt.Sprintf("./snapshot_tables/%s.csv", models.GitlabAccount{}.TableName()),
@@ -69,7 +69,7 @@ func TestGitlabAccountDataFlow(t *testing.T) {
// verify conversion
dataflowTester.FlushTabler(&crossdomain.Account{})
- dataflowTester.Subtask(tasks.ConvertAccountMeta, taskData)
+ dataflowTester.Subtask(tasks.ConvertAccountsMeta, taskData)
dataflowTester.VerifyTable(
crossdomain.Account{},
fmt.Sprintf("./snapshot_tables/%s.csv", crossdomain.Account{}.TableName()),
diff --git a/plugins/gitlab/impl/impl.go b/plugins/gitlab/impl/impl.go
index fe21fc65..cf5e1bb0 100644
--- a/plugins/gitlab/impl/impl.go
+++ b/plugins/gitlab/impl/impl.go
@@ -65,9 +65,9 @@ func (plugin Gitlab) SubTaskMetas() []core.SubTaskMeta {
tasks.CollectApiPipelinesMeta,
tasks.ExtractApiPipelinesMeta,
tasks.EnrichMergeRequestsMeta,
- tasks.CollectAccountMeta,
- tasks.ExtractAccountMeta,
- tasks.ConvertAccountMeta,
+ tasks.CollectAccountsMeta,
+ tasks.ExtractAccountsMeta,
+ tasks.ConvertAccountsMeta,
tasks.ConvertProjectMeta,
tasks.ConvertApiMergeRequestsMeta,
tasks.ConvertApiNotesMeta,
diff --git a/plugins/gitlab/tasks/account_collector.go b/plugins/gitlab/tasks/account_collector.go
index 49824042..9d9c30fb 100644
--- a/plugins/gitlab/tasks/account_collector.go
+++ b/plugins/gitlab/tasks/account_collector.go
@@ -28,7 +28,7 @@ import (
const RAW_USER_TABLE = "gitlab_api_users"
-var CollectAccountMeta = core.SubTaskMeta{
+var CollectAccountsMeta = core.SubTaskMeta{
Name: "collectAccounts",
EntryPoint: CollectAccounts,
EnabledByDefault: true,
diff --git a/plugins/gitlab/tasks/account_convertor.go b/plugins/gitlab/tasks/account_convertor.go
index 5f3ff4d8..267eb214 100644
--- a/plugins/gitlab/tasks/account_convertor.go
+++ b/plugins/gitlab/tasks/account_convertor.go
@@ -29,7 +29,7 @@ import (
"github.com/apache/incubator-devlake/plugins/helper"
)
-var ConvertAccountMeta = core.SubTaskMeta{
+var ConvertAccountsMeta = core.SubTaskMeta{
Name: "convertAccounts",
EntryPoint: ConvertAccounts,
EnabledByDefault: true,
diff --git a/plugins/gitlab/tasks/account_extractor.go b/plugins/gitlab/tasks/account_extractor.go
index fc46a218..d2e9c934 100644
--- a/plugins/gitlab/tasks/account_extractor.go
+++ b/plugins/gitlab/tasks/account_extractor.go
@@ -25,7 +25,7 @@ import (
"github.com/apache/incubator-devlake/plugins/helper"
)
-var ExtractAccountMeta = core.SubTaskMeta{
+var ExtractAccountsMeta = core.SubTaskMeta{
Name: "extractAccounts",
EntryPoint: ExtractAccounts,
EnabledByDefault: true,