MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / latestStrategyCommits

Method latestStrategyCommits

module/release/iml.go:53–65  ·  view source on GitHub ↗
(ctx context.Context, serviceId string)

Source from the content-addressed store, hash-verified

51}
52
53func (m *imlReleaseModule) latestStrategyCommits(ctx context.Context, serviceId string) ([]*commit.Commit[strategy.Commit], error) {
54 list, err := m.strategyService.All(ctx, 2, serviceId)
55 if err != nil {
56 return nil, fmt.Errorf("get latest strategy failed:%w", err)
57 }
58 for _, s := range list {
59 err = m.strategyService.CommitStrategy(ctx, strategy_dto.ScopeService, serviceId, s.Id, s)
60 if err != nil {
61 return nil, err
62 }
63 }
64 return m.strategyService.ListLatestStrategyCommit(ctx, strategy_dto.ScopeService, serviceId)
65}
66
67func (m *imlReleaseModule) Create(ctx context.Context, serviceId string, input *dto.CreateInput) (string, error) {
68 proInfo, err := m.projectService.Check(ctx, serviceId, projectRuleMustServer)

Callers 1

CreateMethod · 0.95

Calls 3

AllMethod · 0.65
CommitStrategyMethod · 0.65

Tested by

no test coverage detected