From c7b7745e10fc96d9bdc36dd4feeceb4af4d00a80 Mon Sep 17 00:00:00 2001 From: Don Date: Mon, 9 Sep 2019 17:34:39 -0700 Subject: [PATCH] Add Context struct --- pkg/plugin/types.go | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkg/plugin/types.go b/pkg/plugin/types.go index caabce3..64c6eed 100644 --- a/pkg/plugin/types.go +++ b/pkg/plugin/types.go @@ -8,23 +8,27 @@ package plugin import "time" type ( - // BaseConfig is the common configuration for a plugin. + // Context contains information about the current execution context. // - // The configuration organizes all the information available to a plugin - // executing as a step within a stage. + // The context organizes all the information available to a plugin executing + // as a step within a stage. // // Plugins can choose to compose this within their own config. // // import "github.com/drone-plugins/drone-plugin-lib/pkg/plugin" // - // type MyPluginConfig struct { - // plugin.BaseConfig + // type MyPluginContext struct { + // plugin.Context // Foo string // Bar string // } - BaseConfig struct { - Stage Stage - Step Step + Context struct { + Build Build + Repo Repo + Commit Commit + Stage Stage + Step Step + SemVer SemVer } // Build represents a build of a repository.