Skip to content

Commit 007ed6d

Browse files
authored
Skip repos without default branch (#312)
These are usually empty repos with 0 branches.
1 parent 3727b00 commit 007ed6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/campaigns/service.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ func (svc *Service) ResolveRepositories(ctx context.Context, spec *CampaignSpec)
300300

301301
for _, repo := range repos {
302302
if _, ok := seen[repo.ID]; !ok {
303+
if repo.DefaultBranch == nil {
304+
continue
305+
}
303306
switch st := strings.ToLower(repo.ExternalRepository.ServiceType); st {
304307
case "github", "gitlab", "bitbucketserver":
305308

0 commit comments

Comments
 (0)