Skip to content

Commit b3ee6da

Browse files
authored
fix(plugin): do not call GitHub content API for releases and tags (#7274)
Signed-off-by: knqyf263 <[email protected]>
1 parent 35c60f0 commit b3ee6da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/downloader/download.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ func (t *CustomTransport) RoundTrip(req *http.Request) (*http.Response, error) {
154154
func NewGitHubTransport(u *url.URL, insecure bool, token string) http.RoundTripper {
155155
client := newGitHubClient(insecure, token)
156156
ss := strings.SplitN(u.Path, "/", 4)
157-
if len(ss) < 4 || strings.HasPrefix(ss[3], "archive/") {
157+
if len(ss) < 4 || strings.HasPrefix(ss[3], "archive/") || strings.HasPrefix(ss[3], "releases/") ||
158+
strings.HasPrefix(ss[3], "tags/") {
158159
// Use the default transport from go-github for authentication
159160
return client.Client().Transport
160161
}

0 commit comments

Comments
 (0)