diff --git a/filters.go b/filters.go index 8dc45c4..2db2002 100644 --- a/filters.go +++ b/filters.go @@ -10,11 +10,14 @@ import ( type filterFunc func(*github.Repository) bool var filters = map[string]filterFunc{ + "archived": filterArchived, "fork": filterFork, "dockerfile": filterDockerfile, "public": filterPublic, } +func filterArchived(repo *github.Repository) bool { return repo.Archived != nil && *repo.Archived } + func filterDockerfile(repo *github.Repository) bool { ctx := context.Background() _, _, resp, err := client.Repositories.GetContents(ctx, *repo.Owner.Login, *repo.Name, "Dockerfile", nil)