Closed prasadtalasila closed 1 month ago
@prasadtalasila I think I need some more context for this issue. What are the goals/requirements? Should it serve files from GIT?
@nichlaes Yes. To serve files over git without showing the .git
files to users.
Hi Prasad.
Can you add the link you used to show me an example of the the users on gitlab?
please see gitlab.com
Can you maybe elaborate on how you think it should be implemented.
Should it clone all the files to the local_path
?
Do we need a extra env variable with token
and repo name?
Whenever there is a change to a file, it should commit?
What is the overall goal of the feature? Just so I know what the implementation should solve.
The scope of this issue is to just include MODE='git'
in the .env
file. We will deal with the token
and repo name
in the future PRs.
Including git mode will require adding scaffolding in the existing code base to support this git mode. The goal is to just have scaffolding now and add the actual git functionality later.
We used to have gitlab mode in libms wherein the gitlab is queried to fetch the files. This gitlab mode became non-functional due to upgrade of gitlab GraphQL API. The PR #435 has removed the gitlab mode. The changes made in that PR can show the scaffolding needed. Please use as an inspiration only; the design can perhaps be improved.
The libms-gitlab-code commit contains the example code scaffolding for gitlab mode. We need similar one for git mode.
I should have pushed the necessary code now. Should I also update the docs/markdown files?
Thanks for the update. The code structure looks similar to the one we had for gitlab mode. Please think about the design suggestion made on this discussion page. I am hoping that it would result in modular code. We can have the design discussion on the discussion page and only check the code implementation on this page.
In addition, please fix the failing tests and add tests for the git mode code as well. Thanks.
@nichlaes This example provides a template for moving the MODE-based object creation from FilesServiceFactory
class to files.module.ts
. This move helps avoiding creating redundant objects (for example, creating LocalFileService
object when using git mode).
This issue is relates to discussion #951. In order to support these new features, the first step is to create a git mode for libms. We need to have a git configuration. This configuration can be specified in
.env
of libms as follows.