(kind entities.Kind, out io.Writer)
| 1210 | } |
| 1211 | |
| 1212 | func dryRunAllRepos(kind entities.Kind, out io.Writer) error { |
| 1213 | repos, err := repoconfig.LoadEnabled(kind) |
| 1214 | if err != nil { |
| 1215 | return err |
| 1216 | } |
| 1217 | if len(repos) == 0 { |
| 1218 | fmt.Fprintf(out, "[dry-run] No enabled %s repositories configured\n", kind) |
| 1219 | return nil |
| 1220 | } |
| 1221 | fmt.Fprintf(out, "[dry-run] Would fetch from %d repositories:\n\n", len(repos)) |
| 1222 | for key, r := range repos { |
| 1223 | rOwner := r.EffectiveOwner() |
| 1224 | name := r.EffectiveName() |
| 1225 | if rOwner == "" || name == "" { |
| 1226 | continue |
| 1227 | } |
| 1228 | fmt.Fprintf(out, " %s/%s@%s (%s)\n", rOwner, name, r.EffectiveBranch(), key) |
| 1229 | } |
| 1230 | return nil |
| 1231 | } |
| 1232 | |
| 1233 | func fetchAllRepos(cmd *cobra.Command, kind entities.Kind, out io.Writer) error { |
| 1234 | repos, err := repoconfig.LoadEnabled(kind) |
no test coverage detected