( subtaskMetas []plugin.SubTaskMeta, connection *models.GithubConnection, entities []string, stage coreModels.PipelineStage, options *tasks.GithubOptions, )
| 196 | } |
| 197 | |
| 198 | func addGithub( |
| 199 | subtaskMetas []plugin.SubTaskMeta, |
| 200 | connection *models.GithubConnection, |
| 201 | entities []string, |
| 202 | stage coreModels.PipelineStage, |
| 203 | options *tasks.GithubOptions, |
| 204 | ) (coreModels.PipelineStage, errors.Error) { |
| 205 | // construct github(graphql) task |
| 206 | if connection.EnableGraphql { |
| 207 | // FIXME this need fix when 2 plugins merged |
| 208 | p, err := plugin.GetPlugin(`github_graphql`) |
| 209 | if err != nil { |
| 210 | return nil, err |
| 211 | } |
| 212 | if pluginGq, ok := p.(plugin.PluginTask); ok { |
| 213 | task, err := helper.MakePipelinePlanTask("github_graphql", pluginGq.SubTaskMetas(), entities, options) |
| 214 | if err != nil { |
| 215 | return nil, err |
| 216 | } |
| 217 | stage = append(stage, task) |
| 218 | } else { |
| 219 | return nil, errors.BadInput.New("plugin github_graphql does not support SubTaskMetas") |
| 220 | } |
| 221 | } else { |
| 222 | task, err := helper.MakePipelinePlanTask("github", subtaskMetas, entities, options) |
| 223 | if err != nil { |
| 224 | return nil, err |
| 225 | } |
| 226 | stage = append(stage, task) |
| 227 | } |
| 228 | return stage, nil |
| 229 | } |
| 230 | |
| 231 | func getApiRepo( |
| 232 | op *tasks.GithubOptions, |
no test coverage detected