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

Method HasEntryFile

component/space.go:698–706  ·  view source on GitHub ↗

HasEntryFile checks whether space repo has entry point file to run with

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

Source from the content-addressed store, hash-verified

696
697// HasEntryFile checks whether space repo has entry point file to run with
698func (c *SpaceComponent) HasEntryFile(ctx context.Context, space *database.Space) bool {
699 namespace, name := space.Repository.NamespaceAndName()
700 entryFile := "app.py"
701 if space.Sdk == scheduler.NGINX.Name {
702 entryFile = "nginx.conf"
703 }
704
705 return c.hasEntryFile(ctx, namespace, name, entryFile)
706}
707
708func (c *SpaceComponent) hasEntryFile(ctx context.Context, namespace, name, entryFile string) bool {
709 var req gitserver.GetRepoInfoByPathReq

Callers 1

FixHasEntryFileMethod · 0.95

Calls 2

hasEntryFileMethod · 0.95
NamespaceAndNameMethod · 0.45

Tested by

no test coverage detected