Skip to content

Commit

Permalink
Skip repos without default branch (#312)
Browse files Browse the repository at this point in the history
These are usually empty repos with 0 branches.
  • Loading branch information
eseliger authored Sep 10, 2020
1 parent 7f1a5c8 commit 5468604
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/campaigns/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ func (svc *Service) ResolveRepositories(ctx context.Context, spec *CampaignSpec)

for _, repo := range repos {
if _, ok := seen[repo.ID]; !ok {
if repo.DefaultBranch == nil {
continue
}
switch st := strings.ToLower(repo.ExternalRepository.ServiceType); st {
case "github", "gitlab", "bitbucketserver":

Expand Down

0 comments on commit 5468604

Please sign in to comment.