in docbot/action.go [209:228]
func (a *Action) getRepoLabels() (map[string]struct{}, error) {
ctx := context.Background()
listOptions := &github.ListOptions{PerPage: 100}
repoLabels := make(map[string]struct{}, 0)
for {
rLabels, resp, err := a.client.Issues.ListLabels(ctx, a.config.GetOwner(), a.config.GetRepo(), listOptions)
if err != nil {
return nil, err
}
for _, label := range rLabels {
repoLabels[label.GetName()] = struct{}{}
}
if resp.NextPage == 0 {
break
}
listOptions.Page = resp.NextPage
}
return repoLabels, nil
}