PostDeploymentsByProjectName @Summary create deployment by project name @Description Create deployment pipeline by project name. @Description example1: {"repo_url":"devlake","commit_sha":"015e3d3b480e417aede5a1293bd61de9b0fd051d","start_time":"2020-01-01T12:00:00+00:00","end_time":"2020-01-01T1
(input *plugin.ApiResourceInput)
| 125 | // @Failure 500 {string} errcode.Error "Internal Error" |
| 126 | // @Router /projects/:projectName/deployments [POST] |
| 127 | func PostDeploymentsByProjectName(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) { |
| 128 | // find or create the connection for this project |
| 129 | connection, err, shouldReturn := getOrCreateConnection(input) |
| 130 | if shouldReturn { |
| 131 | return nil, err |
| 132 | } |
| 133 | |
| 134 | return postDeployments(input, connection, err) |
| 135 | } |
| 136 | |
| 137 | func getOrCreateConnection(input *plugin.ApiResourceInput) (*models.WebhookConnection, errors.Error, bool) { |
| 138 | connection := &models.WebhookConnection{} |
nothing calls this directly
no test coverage detected