-
Notifications
You must be signed in to change notification settings - Fork 154
feat : Yaml based Plugin for CLI features #452
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
Conversation
Pull Request Test Coverage Report for Build 2999216758
💛 - Coveralls |
a017827 to
f99145a
Compare
f17d3e9 to
a236524
Compare
47f6d5b to
9f75e25
Compare
plugin/yaml/plugin.go
Outdated
|
|
||
| type PluginSpec struct { | ||
| models.PluginInfoResponse `yaml:",inline"` | ||
| models.GetQuestionsResponse `yaml:",inline"` // PluginQuestion has extra attrs related to validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the comment
models/plugin.go
Outdated
|
|
||
| func (p *Plugin) Info() *PluginInfoResponse { | ||
| resp, _ := p.Base.PluginInfo() | ||
| if p.Base != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use IsYamlPlugin() instead
bc7ae92 to
cb7fd66
Compare
| schema := tasks.Info() | ||
| v.logger.Info(fmt.Sprintf("\n%d. %s", taskIdx+1, schema.Name)) | ||
| if tasks.YamlMod != nil { | ||
| v.logger.Info(fmt.Sprintf("\n%d. %s (%s)", taskIdx+1, schema.Name, "yaml")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this required ?
* refactor cmd/plugin * add client sync feature; refactor plugin manager to plugin pkg * fix lint; sync&cleanup issue * make plugin discovery static (both client and server) * fix : feedback * fix : feedback * fix : url formatting for downloading plugins
Below are powered via YAML instead of binaries:
Changes include:
Pluginto containYamlModreference toPluginSpecwhich implementsCommandLineModInterface.Plugin.YamlModto drive survey (job create & add hook); if it's present elsePlugin.CliModwill drive survey.optimus plugin validate --path {{file || dir}}