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

Method PatchBasicBlueprintV2

backend/test/helper/api.go:108–136  ·  view source on GitHub ↗

PatchBasicBlueprintV2 FIXME

(blueprintId uint64, name string, config *BlueprintV2Config)

Source from the content-addressed store, hash-verified

106
107// PatchBasicBlueprintV2 FIXME
108func (d *DevlakeClient) PatchBasicBlueprintV2(blueprintId uint64, name string, config *BlueprintV2Config) models.Blueprint {
109 blueprint := models.Blueprint{
110 Name: name,
111 ProjectName: config.ProjectName,
112 Mode: models.BLUEPRINT_MODE_NORMAL,
113 Plan: nil,
114 Enable: true,
115 CronConfig: "manual",
116 IsManual: true,
117 SyncPolicy: models.SyncPolicy{
118 SkipOnFail: config.SkipOnFail,
119 TimeAfter: func() *time.Time {
120 t, _ := time.Parse(time.RFC3339, time.Now().AddDate(0, 0, 1).Format(time.RFC3339))
121 return &t
122 }(),
123 },
124 Labels: []string{"test-label"},
125 Connections: []*models.BlueprintConnection{
126 config.Connection,
127 },
128 }
129 d.testCtx.Helper()
130 blueprint = sendHttpRequest[models.Blueprint](d.testCtx, d.timeout, &testContext{
131 client: d,
132 printPayload: true,
133 inlineJson: false,
134 }, http.MethodPatch, fmt.Sprintf("%s/blueprints/%d", d.Endpoint, blueprintId), nil, &blueprint)
135 return blueprint
136}
137
138func (d *DevlakeClient) ListBlueprints() blueprints.PaginatedBlueprint {
139 return sendHttpRequest[blueprints.PaginatedBlueprint](d.testCtx, d.timeout, &testContext{

Callers 2

TestArgoCDPluginFunction · 0.80
CreateTestBlueprintsFunction · 0.80

Calls 2

sendHttpRequestFunction · 0.85
FormatMethod · 0.80

Tested by 1

TestArgoCDPluginFunction · 0.64