SetUserHash will set the hash of the given user repo to use when loading.
(username, hash string)
| 205 | |
| 206 | // SetUserHash will set the hash of the given user repo to use when loading. |
| 207 | func (c *Config) SetUserHash(username, hash string) error { |
| 208 | repo, err := git.EnsureRepo(c.fs, "admin/user-"+username) |
| 209 | if err != nil { |
| 210 | return err |
| 211 | } |
| 212 | |
| 213 | err = repo.Checkout(hash) |
| 214 | if err != nil { |
| 215 | return err |
| 216 | } |
| 217 | |
| 218 | c.userRepos[username] = hash |
| 219 | |
| 220 | return nil |
| 221 | } |
| 222 | |
| 223 | // SetOrgHash will set the hash of the given org repo to use when loading. |
| 224 | func (c *Config) SetOrgHash(orgName, hash string) error { |
no test coverage detected