MCPcopy Create free account
hub / github.com/bytebase/bytebase / createPlan

Method createPlan

backend/api/mcp/tool_change.go:322–338  ·  view source on GitHub ↗

createPlan creates a plan with a single changeDatabaseConfig spec.

(ctx context.Context, project, title, target, sheet string)

Source from the content-addressed store, hash-verified

320
321// createPlan creates a plan with a single changeDatabaseConfig spec.
322func (s *Server) createPlan(ctx context.Context, project, title, target, sheet string) (string, error) {
323 return s.callAPI(ctx, "/bytebase.v1.PlanService/CreatePlan", "create plans", "bb.plans.create", map[string]any{
324 "parent": project,
325 "plan": map[string]any{
326 "title": title,
327 "specs": []map[string]any{
328 {
329 "id": "spec-1",
330 "changeDatabaseConfig": map[string]any{
331 "targets": []string{target},
332 "sheet": sheet,
333 },
334 },
335 },
336 },
337 })
338}
339
340// planCheckBudget returns the effective poll budget, allowing tests to override.
341func (s *Server) planCheckBudget() time.Duration {

Callers 1

handleChangeMethod · 0.95

Calls 1

callAPIMethod · 0.95

Tested by

no test coverage detected