MCPcopy Create free account
hub / github.com/OpenCSGs/csghub-server / FixHasEntryFile

Method FixHasEntryFile

component/space.go:636–644  ·  view source on GitHub ↗

FixHasEntryFile checks whether git repo has entry point file and update space's HasAppFile property in db

(ctx context.Context, s *database.Space)

Source from the content-addressed store, hash-verified

634
635// FixHasEntryFile checks whether git repo has entry point file and update space's HasAppFile property in db
636func (c *SpaceComponent) FixHasEntryFile(ctx context.Context, s *database.Space) *database.Space {
637 hasAppFile := c.HasEntryFile(ctx, s)
638 if s.HasAppFile != hasAppFile {
639 s.HasAppFile = hasAppFile
640 c.ss.Update(ctx, *s)
641 }
642
643 return s
644}
645
646func (c *SpaceComponent) status(ctx context.Context, s *database.Space) (string, string, error) {
647 if !s.HasAppFile {

Callers 1

deployMethod · 0.80

Calls 2

HasEntryFileMethod · 0.95
UpdateMethod · 0.45

Tested by

no test coverage detected