Exclude archived repositories by default.

This closes #6.
This commit is contained in:
Steve Kemp
2020-06-12 21:28:00 +03:00
parent 0266387540
commit 3e56a35a3a
2 changed files with 11 additions and 0 deletions

10
main.go
View File

@@ -181,6 +181,7 @@ func main() {
//
// Parse flags
//
archived := flag.Bool("archived", false, "Include archived repositories in the output?")
api := flag.String("api", "https://api.github.com/", "The API end-point to use for the remote git-host.")
authHeader := flag.Bool("auth-header-token", false, "Use an authorization-header including 'token' rather than 'bearer'.\nThis is required for gitbucket, and perhaps other systems.")
exclude := flag.String("exclude", "", "Comma-separated list of repositories to exclude.")
@@ -360,6 +361,15 @@ func main() {
//
for _, repo := range all {
//
// If the repository is archived then
// skip it, unless we're supposed to keep
// it.
//
if *repo.Archived && !*archived {
continue
}
//
// The clone-type is configurable
//