message: Validate the gitUrl in addProject and updateProject mutations.
diff: @@ -28,6 +28,9 @@ import type {ResolversObj} from '../';
  const removePrivateKey = R.assoc('privateKey', null);
  +const isValidGitUrl = value =>
  + /(?:git|ssh|https?|git@[-\w.]+):(\/\/)?(.*?)(\.git)(\/?|\#[-\d\w._]+?)$/.test(value);
  +
  const getAllProjects = async (
  root,
  args,
  @@ -196,6 +199,9 @@ const addProject = async (
  'Only lowercase characters, numbers and dashes allowed for name!',
  );
  }
  + if (!isValidGitUrl(input.gitUrl)) {
  + throw new Error('The provided gitUrl is invalid.',);
  + }
  let keyPair = {};
  try {
  @@ -419,6 +425,10 @@ const updateProject = async (
  }
  }
  + if (gitUrl !== undefined && !isValidGitUrl(gitUrl)) {
  + throw new Error('The provided gitUrl is invalid.',);
  + }
  +
  const oldProject = await Helpers(sqlClient).getProjectById(id);
  // TODO If the privateKey changes, automatically remove the old one from the
  