Fix check bug where versions were being missed
This commit is contained in:
14
gitlab.go
14
gitlab.go
@@ -85,13 +85,13 @@ func (g *GitlabClient) ListTags() ([]*gitlab.Tag, error) {
|
|||||||
return []*gitlab.Tag{}, err
|
return []*gitlab.Tag{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allTags = append(allTags, tags...)
|
||||||
|
|
||||||
if opt.Page >= res.TotalPages {
|
if opt.Page >= res.TotalPages {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
opt.Page = res.NextPage
|
opt.Page = res.NextPage
|
||||||
|
|
||||||
allTags = append(allTags, tags...)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return allTags, nil
|
return allTags, nil
|
||||||
@@ -115,10 +115,6 @@ func (g *GitlabClient) ListTagsUntil(tag_name string) ([]*gitlab.Tag, error) {
|
|||||||
return []*gitlab.Tag{}, err
|
return []*gitlab.Tag{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if opt.Page >= res.TotalPages {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
foundTag := false
|
foundTag := false
|
||||||
for i, tag := range tags {
|
for i, tag := range tags {
|
||||||
if tag.Name == tag_name {
|
if tag.Name == tag_name {
|
||||||
@@ -130,9 +126,13 @@ func (g *GitlabClient) ListTagsUntil(tag_name string) ([]*gitlab.Tag, error) {
|
|||||||
if foundTag {
|
if foundTag {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
allTags = append(allTags, tags...)
|
||||||
|
|
||||||
|
if opt.Page >= res.TotalPages {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
opt.Page = res.NextPage
|
opt.Page = res.NextPage
|
||||||
allTags = append(allTags, tags...)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return allTags, nil
|
return allTags, nil
|
||||||
|
Reference in New Issue
Block a user