diff --git a/src/pkgcheck/checks/metadata_xml.py b/src/pkgcheck/checks/metadata_xml.py index a3a7b6437..d40062b33 100644 --- a/src/pkgcheck/checks/metadata_xml.py +++ b/src/pkgcheck/checks/metadata_xml.py @@ -645,7 +645,10 @@ class MissingRemoteIdCheck(Check): _source = sources.PackageRepoSource known_results = frozenset([MissingRemoteId]) - _gitlab_match = r"(?P(\w[^/]*/)*\w[^/]*/\w[^/]*)" + # https://docs.gitlab.com/ee/user/reserved_names.html + _gitlab_reserved_groups = [ "404.html", "422.html", "500.html", "502.html", "503.html", "admin", "api", "apple-touch-icon.png", "assets", "dashboard", "deploy.html", "explore", "favicon.ico", "favicon.png", "files", "groups", "health_check", "help", "import", "jwt", "login", "oauth", "profile", "projects", "public", "robots.txt", "s", "search", "sitemap", "sitemap.xml", "sitemap.xml.gz", "slash-command-logo.png", "snippets", "unsubscribes", "uploads", "users", "v2" ] + _gitlab_reserved_projects = [ "badges", "blame", "blob", "builds", "commits", "create", "create_dir", "edit", "environments/folders", "files", "find_file", "gitlab-lfs/objects", "info/lfs/objects", "new", "preview", "raw", "refs", "tree", "update", "wikis" ] + _gitlab_match = r"(?P((?!{'|'.join(_gitlab_reserved_groups)}/)\w[^/]*/)+(?!{'|'.join(_gitlab_reserved_projects)}/)\w[^/]*)" remotes_map = ( ("bitbucket", r"https://bitbucket.org/(?P[^/]+/[^/]+)"),