codePreviews: add support for selfhost gitlab

This commit is contained in:
Cynthia Foxwell 2022-05-22 13:21:57 -06:00
parent 8345f5858e
commit ae66cfa216

View file

@ -5,7 +5,7 @@ const fetch = require("node-fetch");
const REGEX_GITHUB =
/(?:\s|^)https?:\/\/(www\.)?github\.com\/.+?\/.+?\/blob\/([a-zA-Z0-9-_.#/]*)/g;
const REGEX_GITLAB =
/(?:\s|^)https?:\/\/(www\.)?gitlab\.com\/.+?\/.+?\/-\/blob\/([a-zA-Z0-9-_.#/]*)/g;
/(?:\s|^)https?:\/\/.+?\/.+?\/.+?\/-\/blob\/([a-zA-Z0-9-_.#/]*)/g;
const REGEX_GITEA =
/(?:\s|^)https?:\/\/.+?\/.+?\/.+?\/src\/branch\/([a-zA-Z0-9-_.#/]*)/g;