Open mhow2 opened 4 years ago
I'll check the code in the model and try to propose a solution for checking whether the URL correspond to a valid git.
Would something like this in GitRepository.java would work?
@Override
public VcsRepository setUrl(String url) {
try
{
Git.lsRemoteRepository().setRemote(url).call();
} catch (GitAPIException e) {
return null;
}
return super.setUrl(url);
}
However, I don't know what to return to prevent the addition of the project in MongoDB
Please @aabherve , @ambpro . I has discussed this with @creat89 : being a regular git repo URL or github's wiki documentation URL, the system should check if the remote URL is valid. By valid, I mean it should check it is the repo is available and is accessible. All of this before leaving the user starting the project tasks and let him search what is the problem while the task is progressing with no warning at all in the UI.