Skip to content

Commit 2deeffc

Browse files
list log
1 parent c631d19 commit 2deeffc

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

cmd/commands/git-source.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,25 +155,24 @@ func RunGitSourceList(runtimeName string) error {
155155
}
156156

157157
tb := ansiterm.NewTabWriter(os.Stdout, 0, 0, 4, ' ', 0)
158-
_, err = fmt.Fprintln(tb, "NAME\tREPOURL\tPATH\tSTATUS\tLAST-UPDATED")
158+
_, err = fmt.Fprintln(tb, "NAME\tREPOURL\tPATH\tHEALTH-STATUS\tSYNC-STATUS")
159159
if err != nil {
160160
return fmt.Errorf("failed to print git-source list table headers. Err: %w", err)
161161
}
162162

163163
for _, gs := range gitSources {
164-
// name := gs.
165-
// repoURL := gs.repoURL
166-
// path := gs.path
167-
fmt.Println("%s", gs)
168-
169-
name := "test1"
170-
repoURL := "testrep"
171-
path := "testpath"
164+
name := gs.Metadata.Name
165+
repoURL := gs.Self.RepoURL
166+
path := gs.Self.Path
167+
healthStatus := gs.Self.Status.HealthStatus
168+
syncStatus := gs.Self.Status.SyncStatus
172169

173170
_, err = fmt.Fprintf(tb, "%s\t%s\t%s\t%s\t%s\n",
174171
name,
175172
repoURL,
176173
path,
174+
healthStatus,
175+
syncStatus,
177176
)
178177

179178
if err != nil {
@@ -189,7 +188,6 @@ func NewGitSourceDeleteCommand() *cobra.Command {
189188
cloneOpts *git.CloneOptions
190189
)
191190

192-
193191
cmd := &cobra.Command{
194192
Use: "delete runtime_name git-source_name",
195193
Short: "delete a git-source from a runtime",

0 commit comments

Comments
 (0)