MCPcopy
hub / github.com/apache/devlake / PostDeploymentsByProjectName

Function PostDeploymentsByProjectName

backend/plugins/webhook/api/deployments.go:127–135  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

125// @Failure 500 {string} errcode.Error "Internal Error"
126// @Router /projects/:projectName/deployments [POST]
127func 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
137func getOrCreateConnection(input *plugin.ApiResourceInput) (*models.WebhookConnection, errors.Error, bool) {
138 connection := &models.WebhookConnection{}

Callers

nothing calls this directly

Calls 2

getOrCreateConnectionFunction · 0.85
postDeploymentsFunction · 0.85

Tested by

no test coverage detected