Skip to content

Commit 26f4edf

Browse files
parona-sourcearthurzam
authored andcommitted
MissingRemoteId: expand gitlab matching rules
* Notably handles the particular case with gitlab package hosting. Bug: #636 Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: #637 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent 8edda42 commit 26f4edf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/pkgcheck/checks/metadata_xml.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,9 @@ class MissingRemoteIdCheck(Check):
645645
_source = sources.PackageRepoSource
646646
known_results = frozenset([MissingRemoteId])
647647

648-
_gitlab_match = r"(?P<value>(\w[^/]*/)*\w[^/]*/\w[^/]*)"
648+
# Exclude api groups and raw project names to conform with https://docs.gitlab.com/ee/user/reserved_names.html
649+
# with the URI's which are most likely to end up in SRC_URI
650+
_gitlab_match = r"(?P<value>((?!api/)\w[^/]*/)+(?!raw/)\w[^/]*)"
649651

650652
remotes_map = (
651653
("bitbucket", r"https://bitbucket.org/(?P<value>[^/]+/[^/]+)"),

0 commit comments

Comments
 (0)