(ctx context.Context, namespace, name, entryFile string)
| 706 | } |
| 707 | |
| 708 | func (c *SpaceComponent) hasEntryFile(ctx context.Context, namespace, name, entryFile string) bool { |
| 709 | var req gitserver.GetRepoInfoByPathReq |
| 710 | req.Namespace = namespace |
| 711 | req.Name = name |
| 712 | // root dir |
| 713 | req.Path = "" |
| 714 | req.RepoType = types.SpaceRepo |
| 715 | files, err := c.git.GetRepoFileTree(ctx, req) |
| 716 | if err != nil { |
| 717 | slog.Error("check repo app file existence failed", slog.Any("eror", err)) |
| 718 | return false |
| 719 | } |
| 720 | |
| 721 | for _, f := range files { |
| 722 | if f.Type == "file" && f.Path == entryFile { |
| 723 | return true |
| 724 | } |
| 725 | } |
| 726 | |
| 727 | return false |
| 728 | } |
| 729 | |
| 730 | func (c *SpaceComponent) mergeUpdateSpaceRequest(ctx context.Context, space *database.Space, req *types.UpdateSpaceReq) error { |
| 731 | // Do not update column value if request body do not have it |
no test coverage detected