MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / pluginGitHubReleaseAuthConfigured

Function pluginGitHubReleaseAuthConfigured

internal/pluginstore/auth.go:112–124  ·  view source on GitHub ↗
(plugin Plugin, auth []AuthConfig)

Source from the content-addressed store, hash-verified

110}
111
112func pluginGitHubReleaseAuthConfigured(plugin Plugin, auth []AuthConfig) bool {
113 owner, repo, errRepository := GitHubRepositoryParts(plugin.Repository)
114 if errRepository != nil {
115 return false
116 }
117 releasesURL := fmt.Sprintf(
118 "https://api.github.com/repos/%s/%s/releases/",
119 url.PathEscape(owner),
120 url.PathEscape(repo),
121 )
122 return AuthConfigured(auth, releasesURL+"latest", RequestKindMetadata) ||
123 AuthConfigured(auth, releasesURL+"tags/", RequestKindMetadata)
124}
125
126func applyPluginStoreAuth(headers http.Header, auth []AuthConfig, requestURL string, kind string) error {
127 item, ok := matchingAuthConfig(auth, requestURL, kind)

Callers 1

PluginAuthConfiguredFunction · 0.85

Calls 2

GitHubRepositoryPartsFunction · 0.85
AuthConfiguredFunction · 0.70

Tested by

no test coverage detected