Kiln » gitkiln Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master

restore login workflow, in the form of k.EnsureCredentials()

Changeset dbaba83c560c

Parent 15afcda19cb4

by Profile picture of User 12Benjamin Pollack <benjamin@fogcreek.com>

Changes to one file · Browse files at dbaba83c560c Showing diff from parent 15afcda19cb4 Diff from another changeset...

Change 1 of 1 Show Entire File kiln/​kiln.go Stacked
 
96
97
98
 
 
 
 
 
 
 
 
 
 
 
 
99
100
101
 
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@@ -96,6 +96,18 @@
  return nil  }   +// Makes sure the client has credentials, taking them through the logon +// sequence if not +func (k *KilnClient) EnsureCredentials() error { + if k.credentials.Token == "" && !k.LoadCredentials() { + if err := k.Logon(); err != nil { + return err + } + k.StoreCredentials() + } + return nil +} +  // Browses the history tab of the repository  func (k *KilnClient) BrowseHistory(repo string) error {   return browse(k.repoRoute(repo, ""))