MCPcopy Create free account
hub / github.com/apache/devlake / NewProjectMapping

Function NewProjectMapping

backend/plugins/org/tasks/task_data.go:41–53  ·  view source on GitHub ↗

NewProjectMapping is the construct function of ProjectMapping

(projectName string, pluginScopes []plugin.Scope)

Source from the content-addressed store, hash-verified

39
40// NewProjectMapping is the construct function of ProjectMapping
41func NewProjectMapping(projectName string, pluginScopes []plugin.Scope) ProjectMapping {
42 var scopes []Scope
43 for _, ps := range pluginScopes {
44 scopes = append(scopes, Scope{
45 Table: ps.TableName(),
46 RowID: ps.ScopeId(),
47 })
48 }
49 return ProjectMapping{
50 ProjectName: projectName,
51 Scopes: scopes,
52 }
53}
54
55type TaskData struct {
56 Options *Options

Callers

nothing calls this directly

Calls 2

TableNameMethod · 0.65
ScopeIdMethod · 0.65

Tested by

no test coverage detected