(plugin Plugin, auth []AuthConfig)
| 110 | } |
| 111 | |
| 112 | func 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 | |
| 126 | func applyPluginStoreAuth(headers http.Header, auth []AuthConfig, requestURL string, kind string) error { |
| 127 | item, ok := matchingAuthConfig(auth, requestURL, kind) |
no test coverage detected