HasEntryFile checks whether space repo has entry point file to run with
(ctx context.Context, space *database.Space)
| 696 | |
| 697 | // HasEntryFile checks whether space repo has entry point file to run with |
| 698 | func (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 | |
| 708 | func (c *SpaceComponent) hasEntryFile(ctx context.Context, namespace, name, entryFile string) bool { |
| 709 | var req gitserver.GetRepoInfoByPathReq |
no test coverage detected