(o *adminv1.Project)
| 72 | } |
| 73 | |
| 74 | func 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 | |
| 91 | type project struct { |
| 92 | Name string `header:"name" json:"name"` |