aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github/export.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-04-10 09:50:51 +0200
committerGitHub <noreply@github.com>2021-04-10 09:50:51 +0200
commitd09b9d7c5a6cd8d201f2444ff1fb6302325e1651 (patch)
tree77c89ecb03b92e9cd016fc3b98f4d502374f5570 /bridge/github/export.go
parentbc5f618eba812859bf87ce2c31b278bd518d4555 (diff)
parent8fb6ea0d9578bc1cf94649091ddd03d038dddc47 (diff)
downloadgit-bug-d09b9d7c5a6cd8d201f2444ff1fb6302325e1651.tar.gz
Merge pull request #585 from MichaelMure/dev-gh-bridge
Deal with github bridge import rate limit
Diffstat (limited to 'bridge/github/export.go')
-rw-r--r--bridge/github/export.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bridge/github/export.go b/bridge/github/export.go
index 1a59fbb3..264f2a23 100644
--- a/bridge/github/export.go
+++ b/bridge/github/export.go
@@ -504,7 +504,7 @@ func (ge *githubExporter) cacheGithubLabels(ctx context.Context, gc *githubv4.Cl
return nil
}
-func (ge *githubExporter) getLabelID(gc *githubv4.Client, label string) (string, error) {
+func (ge *githubExporter) getLabelID(label string) (string, error) {
label = strings.ToLower(label)
for cachedLabel, ID := range ge.cachedLabels {
if label == strings.ToLower(cachedLabel) {
@@ -598,7 +598,7 @@ func (ge *githubExporter) createGithubLabelV4(gc *githubv4.Client, label, labelC
func (ge *githubExporter) getOrCreateGithubLabelID(ctx context.Context, gc *githubv4.Client, repositoryID string, label bug.Label) (string, error) {
// try to get label id from cache
- labelID, err := ge.getLabelID(gc, string(label))
+ labelID, err := ge.getLabelID(string(label))
if err == nil {
return labelID, nil
}