From 922d965bb480ebd062077af2503e9af0101b6433 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sun, 13 Apr 2025 12:21:57 +0200 Subject: [PATCH] add comment with source --- services/migrations/github.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/migrations/github.go b/services/migrations/github.go index e92953cd3c..ce3e5ced9e 100644 --- a/services/migrations/github.go +++ b/services/migrations/github.go @@ -880,6 +880,9 @@ func (g *GithubDownloaderV3) FormatCloneURL(opts MigrateOptions, remoteAddr stri return "", err } if len(opts.AuthToken) > 0 { + // "multiple tokens" are used to benefit more "API rate limit quota" + // git clone doesn't count for rate limits, so only use the first token. + // source: https://github.com/orgs/community/discussions/44515 u.User = url.UserPassword("oauth2", strings.Split(opts.AuthToken, ",")[0]) } return u.String(), nil