Skip to content

Commit 406c803

Browse files
author
jguerreiro
committed
chore(srcfingerprint): add skip archived
1 parent 7d34efb commit 406c803

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

provider/github.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ func (p *GitHubProvider) gatherPage(user string, page int) ([]GitRepository, err
8080
continue
8181
}
8282

83+
if p.options.SkipArchived && repo.Archived != nil && *repo.Archived {
84+
continue
85+
}
86+
8387
repositories = append(repositories, createFromGithubRepo(repo))
8488
}
8589

provider/provider.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ type Provider interface {
4040
type Options struct {
4141
// OmitForks will tell the Provider to omit fork repositories
4242
OmitForks bool
43-
43+
// SkipArchived will skip archived repositories
44+
SkipArchived bool
4445
// BaseURL is the base URL of the API
4546
BaseURL string
4647
}

0 commit comments

Comments
 (0)