MCPcopy Create free account
hub / github.com/rilldata/rill / toProjectRow

Function toProjectRow

cli/pkg/printer/resources.go:74–89  ·  view source on GitHub ↗
(o *adminv1.Project)

Source from the content-addressed store, hash-verified

72}
73
74func toProjectRow(o *adminv1.Project) *project {
75 var githubURL string
76 if o.ManagedGitId == "" {
77 githubURL = strings.TrimSuffix(o.GitRemote, ".git")
78 if o.Subpath != "" {
79 githubURL = filepath.Join(githubURL, "tree", o.PrimaryBranch, o.Subpath)
80 }
81 }
82
83 return &project{
84 Name: o.Name,
85 Public: o.Public,
86 GithubURL: githubURL,
87 Organization: o.OrgName,
88 }
89}
90
91type project struct {
92 Name string `header:"name" json:"name"`

Callers 1

toProjectTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected