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

Function convertToPlanCheckRun

backend/api/v1/plan_service.go:1043–1051  ·  view source on GitHub ↗
(projectID string, planUID int64, run *store.PlanCheckRunMessage)

Source from the content-addressed store, hash-verified

1041}
1042
1043func convertToPlanCheckRun(projectID string, planUID int64, run *store.PlanCheckRunMessage) *v1pb.PlanCheckRun {
1044 return &v1pb.PlanCheckRun{
1045 Name: common.FormatPlanCheckRun(projectID, planUID),
1046 Status: convertToPlanCheckRunStatus(run.Status),
1047 Results: convertToPlanCheckRunResults(run.Result.GetResults()),
1048 Error: run.Result.Error,
1049 CreateTime: timestamppb.New(run.CreatedAt),
1050 }
1051}
1052
1053func convertToPlanSpecs(projectID string, specs []*storepb.PlanConfig_Spec) []*v1pb.Plan_Spec {
1054 v1Specs := make([]*v1pb.Plan_Spec, len(specs))

Callers 1

GetPlanCheckRunMethod · 0.85

Calls 4

FormatPlanCheckRunFunction · 0.92
GetResultsMethod · 0.45

Tested by

no test coverage detected