Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugins] Use reflikes for plugins #1845

Merged
merged 24 commits into from
Feb 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix test
  • Loading branch information
mikeland73 committed Feb 29, 2024
commit c4c31c282678f1aac46dd8a65879a38fdc235e08
7 changes: 4 additions & 3 deletions internal/plugin/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type githubPlugin struct {
}

func (p *githubPlugin) Fetch() ([]byte, error) {
return p.FileContent(p.ref.withFilename(p.ref.Dir))
return p.FileContent(pluginConfigName)
}

func (p *githubPlugin) CanonicalName() string {
Expand All @@ -40,9 +40,10 @@ func (p *githubPlugin) FileContent(subpath string) ([]byte, error) {
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
return nil, usererr.New(
"failed to get plugin github:%s (Status code %d). \nPlease make sure a "+
"plugin.json file exists in plugin directory.",
"failed to get plugin github:%s @ %s (Status code %d). \nPlease make "+
"sure a plugin.json file exists in plugin directory.",
p.ref.String(),
contentURL,
res.StatusCode,
)
}
Expand Down