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/05 13:43:18 UTC

[incubator-devlake] branch main updated: feat: team feature update users to account on tool layer step1 (#2421)

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 b433298d feat: team feature update users to account on tool layer step1 (#2421)
b433298d is described below

commit b433298d7633a953fc43dc060960037cc32b6cb7
Author: abeizn <10...@users.noreply.github.com>
AuthorDate: Tue Jul 5 21:43:15 2022 +0800

    feat: team feature update users to account on tool layer step1 (#2421)
    
    * refactor: remove e2e folder
    
    * feat: team feature update users to account on tool layer step1
---
 plugins/gitee/impl/impl.go                         |  2 +-
 plugins/gitee/models/{user.go => account.go}       |  6 +++---
 .../archived/{user.go => account.go}               |  6 +++---
 .../gitee/models/migrationscripts/init_schema.go   |  4 ++--
 .../{user_convertor.go => account_convertor.go}    | 24 +++++++++++-----------
 plugins/gitee/tasks/commit_convertor.go            |  2 +-
 plugins/gitee/tasks/commit_extractor.go            | 16 +++++++--------
 plugins/gitee/tasks/issue_comment_convertor.go     |  2 +-
 plugins/gitee/tasks/issue_convertor.go             |  2 +-
 plugins/gitee/tasks/pr_comment_convertor.go        |  2 +-
 plugins/gitee/tasks/pr_convertor.go                |  2 +-
 plugins/gitee/tasks/repo_extractor.go              |  2 +-
 plugins/github/e2e/comment_test.go                 |  5 +++--
 plugins/github/e2e/event_test.go                   |  5 +++--
 plugins/github/e2e/issue_test.go                   |  5 +++--
 plugins/github/e2e/pr_reviewer_test.go             |  5 +++--
 plugins/github/e2e/pr_test.go                      |  5 +++--
 plugins/github/e2e/repo_test.go                    |  5 +++--
 ...nt.csv => _tool_github_accounts_in_comment.csv} |  0
 ...vent.csv => _tool_github_accounts_in_event.csv} |  0
 ...ssue.csv => _tool_github_accounts_in_issue.csv} |  0
 ...s_in_pr.csv => _tool_github_accounts_in_pr.csv} |  0
 ..._repo.csv => _tool_github_accounts_in_repo.csv} |  0
 ...iew.csv => _tool_github_accounts_in_review.csv} |  0
 .../models/migrationscripts/archived/user.go       |  2 +-
 plugins/github/models/user.go                      |  2 +-
 .../gitlab/e2e/{user_test.go => account_test.go}   |  2 +-
 ..._gitlab_users.csv => _tool_gitlab_accounts.csv} |  0
 .../snapshot_tables/{users.csv => accounts.csv}    |  0
 plugins/gitlab/models/issue.go                     |  4 ++--
 .../models/migrationscripts/archived/issue.go      |  4 ++--
 .../models/migrationscripts/archived/user.go       |  2 +-
 plugins/gitlab/models/user.go                      |  2 +-
 plugins/gitlab/tasks/user_extractor.go             |  2 +-
 .../jira/models/migrationscripts/archived/user.go  |  2 +-
 plugins/jira/models/user.go                        |  2 +-
 plugins/jira/tasks/user_collector.go               |  2 +-
 plugins/tapd/e2e/{user_test.go => account_test.go} |  2 +-
 ...tool_tapd_users.csv => _tool_tapd_accounts.csv} |  0
 .../tapd/models/migrationscripts/archived/user.go  |  2 +-
 plugins/tapd/models/user.go                        |  2 +-
 plugins/tapd/tasks/user_extractor.go               |  2 +-
 42 files changed, 70 insertions(+), 64 deletions(-)

diff --git a/plugins/gitee/impl/impl.go b/plugins/gitee/impl/impl.go
index 94cdddb0..90a1eb53 100644
--- a/plugins/gitee/impl/impl.go
+++ b/plugins/gitee/impl/impl.go
@@ -76,7 +76,7 @@ func (plugin Gitee) SubTaskMetas() []core.SubTaskMeta {
 		tasks.ConvertPullRequestsMeta,
 		tasks.ConvertPullRequestLabelsMeta,
 		tasks.ConvertPullRequestIssuesMeta,
-		tasks.ConvertUsersMeta,
+		tasks.ConvertAccountsMeta,
 		tasks.ConvertIssueCommentsMeta,
 		tasks.ConvertPullRequestCommentsMeta,
 		tasks.ConvertPullRequestsMeta,
diff --git a/plugins/gitee/models/user.go b/plugins/gitee/models/account.go
similarity index 95%
rename from plugins/gitee/models/user.go
rename to plugins/gitee/models/account.go
index 935b863f..53bb1253 100644
--- a/plugins/gitee/models/user.go
+++ b/plugins/gitee/models/account.go
@@ -19,7 +19,7 @@ package models
 
 import "github.com/apache/incubator-devlake/models/common"
 
-type GiteeUser struct {
+type GiteeAccount struct {
 	ConnectionId      uint64 `gorm:"primaryKey"`
 	Id                int    `json:"id" gorm:"primaryKey;autoIncrement:false"`
 	Login             string `json:"login" gorm:"type:varchar(255)"`
@@ -41,6 +41,6 @@ type GiteeUser struct {
 	common.NoPKModel
 }
 
-func (GiteeUser) TableName() string {
-	return "_tool_gitee_users"
+func (GiteeAccount) TableName() string {
+	return "_tool_gitee_accounts"
 }
diff --git a/plugins/gitee/models/migrationscripts/archived/user.go b/plugins/gitee/models/migrationscripts/archived/account.go
similarity index 95%
rename from plugins/gitee/models/migrationscripts/archived/user.go
rename to plugins/gitee/models/migrationscripts/archived/account.go
index 8a78d62c..c9ea694a 100644
--- a/plugins/gitee/models/migrationscripts/archived/user.go
+++ b/plugins/gitee/models/migrationscripts/archived/account.go
@@ -21,7 +21,7 @@ import (
 	"github.com/apache/incubator-devlake/models/migrationscripts/archived"
 )
 
-type GiteeUser struct {
+type GiteeAccount struct {
 	ConnectionId      uint64 `gorm:"primaryKey"`
 	Id                int    `json:"id" gorm:"primaryKey;autoIncrement:false"`
 	Login             string `json:"login" gorm:"type:varchar(255)"`
@@ -43,6 +43,6 @@ type GiteeUser struct {
 	archived.NoPKModel
 }
 
-func (GiteeUser) TableName() string {
-	return "_tool_gitee_users"
+func (GiteeAccount) TableName() string {
+	return "_tool_gitee_accounts"
 }
diff --git a/plugins/gitee/models/migrationscripts/init_schema.go b/plugins/gitee/models/migrationscripts/init_schema.go
index 7666edae..5b077ef1 100644
--- a/plugins/gitee/models/migrationscripts/init_schema.go
+++ b/plugins/gitee/models/migrationscripts/init_schema.go
@@ -57,7 +57,7 @@ func (*InitSchemas) Up(ctx context.Context, db *gorm.DB) error {
 		&archived.GiteeRepoCommit{},
 		&archived.GiteePullRequest{},
 		&archived.GiteePullRequestLabel{},
-		&archived.GiteeUser{},
+		&archived.GiteeAccount{},
 		&archived.GiteePullRequestComment{},
 		&archived.GiteeIssue{},
 		&archived.GiteeIssueComment{},
@@ -79,7 +79,7 @@ func (*InitSchemas) Up(ctx context.Context, db *gorm.DB) error {
 		&archived.GiteeRepoCommit{},
 		&archived.GiteePullRequest{},
 		&archived.GiteePullRequestLabel{},
-		&archived.GiteeUser{},
+		&archived.GiteeAccount{},
 		&archived.GiteePullRequestComment{},
 		&archived.GiteeIssue{},
 		&archived.GiteeIssueComment{},
diff --git a/plugins/gitee/tasks/user_convertor.go b/plugins/gitee/tasks/account_convertor.go
similarity index 74%
rename from plugins/gitee/tasks/user_convertor.go
rename to plugins/gitee/tasks/account_convertor.go
index dcbb732b..44edc410 100644
--- a/plugins/gitee/tasks/user_convertor.go
+++ b/plugins/gitee/tasks/account_convertor.go
@@ -30,35 +30,35 @@ import (
 	"github.com/apache/incubator-devlake/plugins/helper"
 )
 
-var ConvertUsersMeta = core.SubTaskMeta{
-	Name:             "convertUsers",
-	EntryPoint:       ConvertUsers,
+var ConvertAccountsMeta = core.SubTaskMeta{
+	Name:             "convertAccounts",
+	EntryPoint:       ConvertAccounts,
 	EnabledByDefault: true,
-	Description:      "Convert tool layer table gitee_users into  domain layer table users",
+	Description:      "Convert tool layer table gitee_accountss into  domain layer table accountss",
 }
 
-func ConvertUsers(taskCtx core.SubTaskContext) error {
+func ConvertAccounts(taskCtx core.SubTaskContext) error {
 	db := taskCtx.GetDal()
 	rawDataSubTaskArgs, data := CreateRawDataSubTaskArgs(taskCtx, RAW_COMMIT_TABLE)
 
-	cursor, err := db.Cursor(dal.From(&models.GiteeUser{}))
+	cursor, err := db.Cursor(dal.From(&models.GiteeAccount{}))
 	if err != nil {
 		return err
 	}
 	defer cursor.Close()
 
-	userIdGen := didgen.NewDomainIdGenerator(&models.GiteeUser{})
+	userIdGen := didgen.NewDomainIdGenerator(&models.GiteeAccount{})
 
 	converter, err := helper.NewDataConverter(helper.DataConverterArgs{
-		InputRowType:       reflect.TypeOf(models.GiteeUser{}),
+		InputRowType:       reflect.TypeOf(models.GiteeAccount{}),
 		Input:              cursor,
 		RawDataSubTaskArgs: *rawDataSubTaskArgs,
 		Convert: func(inputRow interface{}) ([]interface{}, error) {
-			GiteeUser := inputRow.(*models.GiteeUser)
+			GiteeAccount := inputRow.(*models.GiteeAccount)
 			domainUser := &user.User{
-				DomainEntity: domainlayer.DomainEntity{Id: userIdGen.Generate(data.Options.ConnectionId, GiteeUser.Id)},
-				Name:         GiteeUser.Login,
-				AvatarUrl:    GiteeUser.AvatarUrl,
+				DomainEntity: domainlayer.DomainEntity{Id: userIdGen.Generate(data.Options.ConnectionId, GiteeAccount.Id)},
+				Name:         GiteeAccount.Login,
+				AvatarUrl:    GiteeAccount.AvatarUrl,
 			}
 			return []interface{}{
 				domainUser,
diff --git a/plugins/gitee/tasks/commit_convertor.go b/plugins/gitee/tasks/commit_convertor.go
index 1565d534..06cd11c4 100644
--- a/plugins/gitee/tasks/commit_convertor.go
+++ b/plugins/gitee/tasks/commit_convertor.go
@@ -56,7 +56,7 @@ func ConvertCommits(taskCtx core.SubTaskContext) error {
 	}
 	defer cursor.Close()
 
-	userDidGen := didgen.NewDomainIdGenerator(&models.GiteeUser{})
+	userDidGen := didgen.NewDomainIdGenerator(&models.GiteeAccount{})
 	repoDidGen := didgen.NewDomainIdGenerator(&models.GiteeRepo{})
 	domainRepoId := repoDidGen.Generate(data.Options.ConnectionId, repoId)
 
diff --git a/plugins/gitee/tasks/commit_extractor.go b/plugins/gitee/tasks/commit_extractor.go
index 7635afa4..c7db4c2c 100644
--- a/plugins/gitee/tasks/commit_extractor.go
+++ b/plugins/gitee/tasks/commit_extractor.go
@@ -29,7 +29,7 @@ var ExtractCommitsMeta = core.SubTaskMeta{
 	Name:             "extractApiCommits",
 	EntryPoint:       ExtractApiCommits,
 	EnabledByDefault: true,
-	Description:      "Extract raw commit data into tool layer table GiteeCommit,GiteeUser and GiteeRepoCommit",
+	Description:      "Extract raw commit data into tool layer table GiteeCommit,GiteeAccount and GiteeRepoCommit",
 }
 
 type GiteeCommit struct {
@@ -47,13 +47,13 @@ type GiteeCommit struct {
 }
 
 type GiteeApiCommitResponse struct {
-	Author      *models.GiteeUser `json:"author"`
-	CommentsUrl string            `json:"comments_url"`
-	Commit      GiteeCommit       `json:"commit"`
-	Committer   *models.GiteeUser `json:"committer"`
-	HtmlUrl     string            `json:"html_url"`
-	Sha         string            `json:"sha"`
-	Url         string            `json:"url"`
+	Author      *models.GiteeAccount `json:"author"`
+	CommentsUrl string               `json:"comments_url"`
+	Commit      GiteeCommit          `json:"commit"`
+	Committer   *models.GiteeAccount `json:"committer"`
+	HtmlUrl     string               `json:"html_url"`
+	Sha         string               `json:"sha"`
+	Url         string               `json:"url"`
 }
 
 func ExtractApiCommits(taskCtx core.SubTaskContext) error {
diff --git a/plugins/gitee/tasks/issue_comment_convertor.go b/plugins/gitee/tasks/issue_comment_convertor.go
index a2453fc8..d48cc24a 100644
--- a/plugins/gitee/tasks/issue_comment_convertor.go
+++ b/plugins/gitee/tasks/issue_comment_convertor.go
@@ -54,7 +54,7 @@ func ConvertIssueComments(taskCtx core.SubTaskContext) error {
 	defer cursor.Close()
 
 	issueIdGen := didgen.NewDomainIdGenerator(&models.GiteeIssue{})
-	userIdGen := didgen.NewDomainIdGenerator(&models.GiteeUser{})
+	userIdGen := didgen.NewDomainIdGenerator(&models.GiteeAccount{})
 
 	converter, err := helper.NewDataConverter(helper.DataConverterArgs{
 		InputRowType:       reflect.TypeOf(models.GiteeIssueComment{}),
diff --git a/plugins/gitee/tasks/issue_convertor.go b/plugins/gitee/tasks/issue_convertor.go
index 5ebd2467..92d5806b 100644
--- a/plugins/gitee/tasks/issue_convertor.go
+++ b/plugins/gitee/tasks/issue_convertor.go
@@ -55,7 +55,7 @@ func ConvertIssues(taskCtx core.SubTaskContext) error {
 	defer cursor.Close()
 
 	issueIdGen := didgen.NewDomainIdGenerator(&giteeModels.GiteeIssue{})
-	userIdGen := didgen.NewDomainIdGenerator(&giteeModels.GiteeUser{})
+	userIdGen := didgen.NewDomainIdGenerator(&giteeModels.GiteeAccount{})
 	boardIdGen := didgen.NewDomainIdGenerator(&giteeModels.GiteeRepo{})
 
 	converter, err := helper.NewDataConverter(helper.DataConverterArgs{
diff --git a/plugins/gitee/tasks/pr_comment_convertor.go b/plugins/gitee/tasks/pr_comment_convertor.go
index 8a8c1312..d089ce01 100644
--- a/plugins/gitee/tasks/pr_comment_convertor.go
+++ b/plugins/gitee/tasks/pr_comment_convertor.go
@@ -54,7 +54,7 @@ func ConvertPullRequestComments(taskCtx core.SubTaskContext) error {
 	defer cursor.Close()
 
 	prIdGen := didgen.NewDomainIdGenerator(&models.GiteePullRequest{})
-	userIdGen := didgen.NewDomainIdGenerator(&models.GiteeUser{})
+	userIdGen := didgen.NewDomainIdGenerator(&models.GiteeAccount{})
 
 	converter, err := helper.NewDataConverter(helper.DataConverterArgs{
 		InputRowType:       reflect.TypeOf(models.GiteePullRequestComment{}),
diff --git a/plugins/gitee/tasks/pr_convertor.go b/plugins/gitee/tasks/pr_convertor.go
index 4b245f66..20fe2cbd 100644
--- a/plugins/gitee/tasks/pr_convertor.go
+++ b/plugins/gitee/tasks/pr_convertor.go
@@ -53,7 +53,7 @@ func ConvertPullRequests(taskCtx core.SubTaskContext) error {
 
 	prIdGen := didgen.NewDomainIdGenerator(&models.GiteePullRequest{})
 	repoIdGen := didgen.NewDomainIdGenerator(&models.GiteeRepo{})
-	userIdGen := didgen.NewDomainIdGenerator(&models.GiteeUser{})
+	userIdGen := didgen.NewDomainIdGenerator(&models.GiteeAccount{})
 
 	converter, err := helper.NewDataConverter(helper.DataConverterArgs{
 		InputRowType:       reflect.TypeOf(models.GiteePullRequest{}),
diff --git a/plugins/gitee/tasks/repo_extractor.go b/plugins/gitee/tasks/repo_extractor.go
index 68f95ecc..51858352 100644
--- a/plugins/gitee/tasks/repo_extractor.go
+++ b/plugins/gitee/tasks/repo_extractor.go
@@ -39,7 +39,7 @@ type GiteeApiRepoResponse struct {
 	HTMLUrl     string                `json:"html_url"`
 	Language    string                `json:"language"`
 	Description string                `json:"description"`
-	Owner       models.GiteeUser      `json:"owner"`
+	Owner       models.GiteeAccount   `json:"owner"`
 	Parent      *GiteeApiRepoResponse `json:"parent"`
 	CreatedAt   helper.Iso8601Time    `json:"created_at"`
 	UpdatedAt   *helper.Iso8601Time   `json:"updated_at"`
diff --git a/plugins/github/e2e/comment_test.go b/plugins/github/e2e/comment_test.go
index 76d3b872..17487a2e 100644
--- a/plugins/github/e2e/comment_test.go
+++ b/plugins/github/e2e/comment_test.go
@@ -19,11 +19,12 @@ package e2e
 
 import (
 	"fmt"
+	"testing"
+
 	"github.com/apache/incubator-devlake/models/domainlayer/code"
 	"github.com/apache/incubator-devlake/models/domainlayer/ticket"
 	"github.com/apache/incubator-devlake/plugins/github/models"
 	"github.com/apache/incubator-devlake/plugins/github/tasks"
-	"testing"
 
 	"github.com/apache/incubator-devlake/helpers/e2ehelper"
 	"github.com/apache/incubator-devlake/plugins/github/impl"
@@ -105,7 +106,7 @@ func TestCommentDataFlow(t *testing.T) {
 	)
 	dataflowTester.VerifyTable(
 		models.GithubUser{},
-		"./snapshot_tables/_tool_github_users_in_comment.csv",
+		"./snapshot_tables/_tool_github_accounts_in_comment.csv",
 		[]string{
 			"connection_id",
 			"id",
diff --git a/plugins/github/e2e/event_test.go b/plugins/github/e2e/event_test.go
index 32d2616d..c080ebb1 100644
--- a/plugins/github/e2e/event_test.go
+++ b/plugins/github/e2e/event_test.go
@@ -18,9 +18,10 @@ limitations under the License.
 package e2e
 
 import (
-	"github.com/apache/incubator-devlake/plugins/github/models"
 	"testing"
 
+	"github.com/apache/incubator-devlake/plugins/github/models"
+
 	"github.com/apache/incubator-devlake/helpers/e2ehelper"
 	"github.com/apache/incubator-devlake/plugins/github/impl"
 	"github.com/apache/incubator-devlake/plugins/github/tasks"
@@ -67,7 +68,7 @@ func TestEventDataFlow(t *testing.T) {
 	)
 	dataflowTester.VerifyTable(
 		models.GithubUser{},
-		"./snapshot_tables/_tool_github_users_in_event.csv",
+		"./snapshot_tables/_tool_github_accounts_in_event.csv",
 		[]string{
 			"connection_id",
 			"id",
diff --git a/plugins/github/e2e/issue_test.go b/plugins/github/e2e/issue_test.go
index 1e2339d1..1b33d02c 100644
--- a/plugins/github/e2e/issue_test.go
+++ b/plugins/github/e2e/issue_test.go
@@ -18,9 +18,10 @@ limitations under the License.
 package e2e
 
 import (
+	"testing"
+
 	"github.com/apache/incubator-devlake/models/domainlayer/ticket"
 	"github.com/apache/incubator-devlake/plugins/github/models"
-	"testing"
 
 	"github.com/apache/incubator-devlake/helpers/e2ehelper"
 	"github.com/apache/incubator-devlake/plugins/github/impl"
@@ -108,7 +109,7 @@ func TestIssueDataFlow(t *testing.T) {
 	)
 	dataflowTester.VerifyTable(
 		models.GithubUser{},
-		"./snapshot_tables/_tool_github_users_in_issue.csv",
+		"./snapshot_tables/_tool_github_accounts_in_issue.csv",
 		[]string{
 			"connection_id",
 			"id",
diff --git a/plugins/github/e2e/pr_reviewer_test.go b/plugins/github/e2e/pr_reviewer_test.go
index 7bb8838b..55a5bef0 100644
--- a/plugins/github/e2e/pr_reviewer_test.go
+++ b/plugins/github/e2e/pr_reviewer_test.go
@@ -18,9 +18,10 @@ limitations under the License.
 package e2e
 
 import (
-	"github.com/apache/incubator-devlake/plugins/github/models"
 	"testing"
 
+	"github.com/apache/incubator-devlake/plugins/github/models"
+
 	"github.com/apache/incubator-devlake/helpers/e2ehelper"
 	"github.com/apache/incubator-devlake/plugins/github/impl"
 	"github.com/apache/incubator-devlake/plugins/github/tasks"
@@ -66,7 +67,7 @@ func TestPrReviewerDataFlow(t *testing.T) {
 	)
 	dataflowTester.VerifyTable(
 		models.GithubUser{},
-		"./snapshot_tables/_tool_github_users_in_review.csv",
+		"./snapshot_tables/_tool_github_accounts_in_review.csv",
 		[]string{
 			"connection_id",
 			"id",
diff --git a/plugins/github/e2e/pr_test.go b/plugins/github/e2e/pr_test.go
index 0dd08dfc..94fdfade 100644
--- a/plugins/github/e2e/pr_test.go
+++ b/plugins/github/e2e/pr_test.go
@@ -18,9 +18,10 @@ limitations under the License.
 package e2e
 
 import (
+	"testing"
+
 	"github.com/apache/incubator-devlake/models/domainlayer/code"
 	"github.com/apache/incubator-devlake/plugins/github/models"
-	"testing"
 
 	"github.com/apache/incubator-devlake/helpers/e2ehelper"
 	"github.com/apache/incubator-devlake/plugins/github/impl"
@@ -102,7 +103,7 @@ func TestPrDataFlow(t *testing.T) {
 
 	dataflowTester.VerifyTable(
 		models.GithubUser{},
-		"./snapshot_tables/_tool_github_users_in_pr.csv",
+		"./snapshot_tables/_tool_github_accounts_in_pr.csv",
 		[]string{
 			"connection_id",
 			"id",
diff --git a/plugins/github/e2e/repo_test.go b/plugins/github/e2e/repo_test.go
index d4512b64..b21600be 100644
--- a/plugins/github/e2e/repo_test.go
+++ b/plugins/github/e2e/repo_test.go
@@ -18,10 +18,11 @@ limitations under the License.
 package e2e
 
 import (
+	"testing"
+
 	"github.com/apache/incubator-devlake/models/domainlayer/code"
 	"github.com/apache/incubator-devlake/models/domainlayer/ticket"
 	"github.com/apache/incubator-devlake/plugins/github/models"
-	"testing"
 
 	"github.com/apache/incubator-devlake/helpers/e2ehelper"
 	"github.com/apache/incubator-devlake/plugins/github/impl"
@@ -77,7 +78,7 @@ func TestRepoDataFlow(t *testing.T) {
 	)
 	dataflowTester.VerifyTable(
 		models.GithubUser{},
-		"./snapshot_tables/_tool_github_users_in_repo.csv",
+		"./snapshot_tables/_tool_github_accounts_in_repo.csv",
 		[]string{
 			"connection_id",
 			"id",
diff --git a/plugins/github/e2e/snapshot_tables/_tool_github_users_in_comment.csv b/plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_comment.csv
similarity index 100%
rename from plugins/github/e2e/snapshot_tables/_tool_github_users_in_comment.csv
rename to plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_comment.csv
diff --git a/plugins/github/e2e/snapshot_tables/_tool_github_users_in_event.csv b/plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_event.csv
similarity index 100%
rename from plugins/github/e2e/snapshot_tables/_tool_github_users_in_event.csv
rename to plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_event.csv
diff --git a/plugins/github/e2e/snapshot_tables/_tool_github_users_in_issue.csv b/plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_issue.csv
similarity index 100%
rename from plugins/github/e2e/snapshot_tables/_tool_github_users_in_issue.csv
rename to plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_issue.csv
diff --git a/plugins/github/e2e/snapshot_tables/_tool_github_users_in_pr.csv b/plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_pr.csv
similarity index 100%
rename from plugins/github/e2e/snapshot_tables/_tool_github_users_in_pr.csv
rename to plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_pr.csv
diff --git a/plugins/github/e2e/snapshot_tables/_tool_github_users_in_repo.csv b/plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_repo.csv
similarity index 100%
rename from plugins/github/e2e/snapshot_tables/_tool_github_users_in_repo.csv
rename to plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_repo.csv
diff --git a/plugins/github/e2e/snapshot_tables/_tool_github_users_in_review.csv b/plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_review.csv
similarity index 100%
rename from plugins/github/e2e/snapshot_tables/_tool_github_users_in_review.csv
rename to plugins/github/e2e/snapshot_tables/_tool_github_accounts_in_review.csv
diff --git a/plugins/github/models/migrationscripts/archived/user.go b/plugins/github/models/migrationscripts/archived/user.go
index 32837f77..15e55322 100644
--- a/plugins/github/models/migrationscripts/archived/user.go
+++ b/plugins/github/models/migrationscripts/archived/user.go
@@ -31,5 +31,5 @@ type GithubUser struct {
 }
 
 func (GithubUser) TableName() string {
-	return "_tool_github_users"
+	return "_tool_github_accounts"
 }
diff --git a/plugins/github/models/user.go b/plugins/github/models/user.go
index 09252dff..b71af98f 100644
--- a/plugins/github/models/user.go
+++ b/plugins/github/models/user.go
@@ -33,5 +33,5 @@ type GithubUser struct {
 }
 
 func (GithubUser) TableName() string {
-	return "_tool_github_users"
+	return "_tool_github_accounts"
 }
diff --git a/plugins/gitlab/e2e/user_test.go b/plugins/gitlab/e2e/account_test.go
similarity index 98%
rename from plugins/gitlab/e2e/user_test.go
rename to plugins/gitlab/e2e/account_test.go
index eb2df5a3..9482a60e 100644
--- a/plugins/gitlab/e2e/user_test.go
+++ b/plugins/gitlab/e2e/account_test.go
@@ -28,7 +28,7 @@ import (
 	"github.com/apache/incubator-devlake/plugins/gitlab/tasks"
 )
 
-func TestGitlabUserDataFlow(t *testing.T) {
+func TestGitlabAccountDataFlow(t *testing.T) {
 
 	var gitlab impl.Gitlab
 	dataflowTester := e2ehelper.NewDataFlowTester(t, "gitlab", gitlab)
diff --git a/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_users.csv b/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_accounts.csv
similarity index 100%
rename from plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_users.csv
rename to plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_accounts.csv
diff --git a/plugins/gitlab/e2e/snapshot_tables/users.csv b/plugins/gitlab/e2e/snapshot_tables/accounts.csv
similarity index 100%
rename from plugins/gitlab/e2e/snapshot_tables/users.csv
rename to plugins/gitlab/e2e/snapshot_tables/accounts.csv
diff --git a/plugins/gitlab/models/issue.go b/plugins/gitlab/models/issue.go
index cba859aa..9bcb1b57 100644
--- a/plugins/gitlab/models/issue.go
+++ b/plugins/gitlab/models/issue.go
@@ -69,7 +69,7 @@ type GitlabAuthor struct {
 }
 
 func (GitlabAuthor) TableName() string {
-	return "_tool_gitlab_users"
+	return "_tool_gitlab_accounts"
 }
 
 type GitlabAssignee struct {
@@ -87,5 +87,5 @@ type GitlabAssignee struct {
 }
 
 func (GitlabAssignee) TableName() string {
-	return "_tool_gitlab_users"
+	return "_tool_gitlab_accounts"
 }
diff --git a/plugins/gitlab/models/migrationscripts/archived/issue.go b/plugins/gitlab/models/migrationscripts/archived/issue.go
index 6800ab86..81f08434 100644
--- a/plugins/gitlab/models/migrationscripts/archived/issue.go
+++ b/plugins/gitlab/models/migrationscripts/archived/issue.go
@@ -69,7 +69,7 @@ type GitlabAuthor struct {
 }
 
 func (GitlabAuthor) TableName() string {
-	return "_tool_gitlab_users"
+	return "_tool_gitlab_accounts"
 }
 
 type GitlabAssignee struct {
@@ -87,5 +87,5 @@ type GitlabAssignee struct {
 }
 
 func (GitlabAssignee) TableName() string {
-	return "_tool_gitlab_users"
+	return "_tool_gitlab_accounts"
 }
diff --git a/plugins/gitlab/models/migrationscripts/archived/user.go b/plugins/gitlab/models/migrationscripts/archived/user.go
index 24aec731..4e4465c2 100644
--- a/plugins/gitlab/models/migrationscripts/archived/user.go
+++ b/plugins/gitlab/models/migrationscripts/archived/user.go
@@ -34,5 +34,5 @@ type GitlabUser struct {
 }
 
 func (GitlabUser) TableName() string {
-	return "_tool_gitlab_users"
+	return "_tool_gitlab_accounts"
 }
diff --git a/plugins/gitlab/models/user.go b/plugins/gitlab/models/user.go
index 01ad5547..3d1586cc 100644
--- a/plugins/gitlab/models/user.go
+++ b/plugins/gitlab/models/user.go
@@ -36,5 +36,5 @@ type GitlabUser struct {
 }
 
 func (GitlabUser) TableName() string {
-	return "_tool_gitlab_users"
+	return "_tool_gitlab_accounts"
 }
diff --git a/plugins/gitlab/tasks/user_extractor.go b/plugins/gitlab/tasks/user_extractor.go
index 56d11fad..d3bf38a4 100644
--- a/plugins/gitlab/tasks/user_extractor.go
+++ b/plugins/gitlab/tasks/user_extractor.go
@@ -29,7 +29,7 @@ var ExtractUserMeta = core.SubTaskMeta{
 	Name:             "extractUsers",
 	EntryPoint:       ExtractUsers,
 	EnabledByDefault: true,
-	Description:      "Extract raw workspace data into tool layer table _tool_gitlab_users",
+	Description:      "Extract raw workspace data into tool layer table _tool_gitlab_accounts",
 }
 
 func ExtractUsers(taskCtx core.SubTaskContext) error {
diff --git a/plugins/jira/models/migrationscripts/archived/user.go b/plugins/jira/models/migrationscripts/archived/user.go
index 7bfd17e1..e10a048a 100644
--- a/plugins/jira/models/migrationscripts/archived/user.go
+++ b/plugins/jira/models/migrationscripts/archived/user.go
@@ -33,5 +33,5 @@ type JiraUser struct {
 }
 
 func (JiraUser) TableName() string {
-	return "_tool_jira_users"
+	return "_tool_jira_accounts"
 }
diff --git a/plugins/jira/models/user.go b/plugins/jira/models/user.go
index 691a36ca..975ffa35 100644
--- a/plugins/jira/models/user.go
+++ b/plugins/jira/models/user.go
@@ -35,5 +35,5 @@ type JiraUser struct {
 }
 
 func (JiraUser) TableName() string {
-	return "_tool_jira_users"
+	return "_tool_jira_accounts"
 }
diff --git a/plugins/jira/tasks/user_collector.go b/plugins/jira/tasks/user_collector.go
index fc5dfb65..6ccf5664 100644
--- a/plugins/jira/tasks/user_collector.go
+++ b/plugins/jira/tasks/user_collector.go
@@ -46,7 +46,7 @@ func CollectUsers(taskCtx core.SubTaskContext) error {
 	logger.Info("collect user")
 	cursor, err := db.Cursor(
 		Select("account_id"),
-		From("_tool_jira_users"),
+		From("_tool_jira_accounts"),
 		Where("connection_id = ?", data.Options.ConnectionId),
 	)
 	if err != nil {
diff --git a/plugins/tapd/e2e/user_test.go b/plugins/tapd/e2e/account_test.go
similarity index 98%
rename from plugins/tapd/e2e/user_test.go
rename to plugins/tapd/e2e/account_test.go
index 3af1c406..8425c6fb 100644
--- a/plugins/tapd/e2e/user_test.go
+++ b/plugins/tapd/e2e/account_test.go
@@ -28,7 +28,7 @@ import (
 	"github.com/apache/incubator-devlake/plugins/tapd/tasks"
 )
 
-func TestTapdUserDataFlow(t *testing.T) {
+func TestTapdAccountDataFlow(t *testing.T) {
 
 	var tapd impl.Tapd
 	dataflowTester := e2ehelper.NewDataFlowTester(t, "tapd", tapd)
diff --git a/plugins/tapd/e2e/snapshot_tables/_tool_tapd_users.csv b/plugins/tapd/e2e/snapshot_tables/_tool_tapd_accounts.csv
similarity index 100%
rename from plugins/tapd/e2e/snapshot_tables/_tool_tapd_users.csv
rename to plugins/tapd/e2e/snapshot_tables/_tool_tapd_accounts.csv
diff --git a/plugins/tapd/models/migrationscripts/archived/user.go b/plugins/tapd/models/migrationscripts/archived/user.go
index 442505ce..fa421941 100644
--- a/plugins/tapd/models/migrationscripts/archived/user.go
+++ b/plugins/tapd/models/migrationscripts/archived/user.go
@@ -28,5 +28,5 @@ type TapdUser struct {
 }
 
 func (TapdUser) TableName() string {
-	return "_tool_tapd_users"
+	return "_tool_tapd_accounts"
 }
diff --git a/plugins/tapd/models/user.go b/plugins/tapd/models/user.go
index b34f3d3d..2c8cf97b 100644
--- a/plugins/tapd/models/user.go
+++ b/plugins/tapd/models/user.go
@@ -28,5 +28,5 @@ type TapdUser struct {
 }
 
 func (TapdUser) TableName() string {
-	return "_tool_tapd_users"
+	return "_tool_tapd_accounts"
 }
diff --git a/plugins/tapd/tasks/user_extractor.go b/plugins/tapd/tasks/user_extractor.go
index f71945a9..e9f4b520 100644
--- a/plugins/tapd/tasks/user_extractor.go
+++ b/plugins/tapd/tasks/user_extractor.go
@@ -31,7 +31,7 @@ var ExtractUserMeta = core.SubTaskMeta{
 	Name:             "extractUsers",
 	EntryPoint:       ExtractUsers,
 	EnabledByDefault: true,
-	Description:      "Extract raw workspace data into tool layer table _tool_tapd_users",
+	Description:      "Extract raw workspace data into tool layer table _tool_tapd_accounts",
 }
 
 func ExtractUsers(taskCtx core.SubTaskContext) error {