commit: 26f4edff6c429ff7b0d6583683a1a1d1954817e1 Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Mon Nov 27 10:04:35 2023 +0000 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> CommitDate: Fri Dec 8 18:32:42 2023 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=26f4edff
MissingRemoteId: expand gitlab matching rules * Notably handles the particular case with gitlab package hosting. Bug: https://github.com/pkgcore/pkgcheck/issues/636 Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Closes: https://github.com/pkgcore/pkgcheck/pull/637 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> src/pkgcheck/checks/metadata_xml.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pkgcheck/checks/metadata_xml.py b/src/pkgcheck/checks/metadata_xml.py index a3a7b643..fb574c0e 100644 --- a/src/pkgcheck/checks/metadata_xml.py +++ b/src/pkgcheck/checks/metadata_xml.py @@ -645,7 +645,9 @@ class MissingRemoteIdCheck(Check): _source = sources.PackageRepoSource known_results = frozenset([MissingRemoteId]) - _gitlab_match = r"(?P<value>(\w[^/]*/)*\w[^/]*/\w[^/]*)" + # Exclude api groups and raw project names to conform with https://docs.gitlab.com/ee/user/reserved_names.html + # with the URI's which are most likely to end up in SRC_URI + _gitlab_match = r"(?P<value>((?!api/)\w[^/]*/)+(?!raw/)\w[^/]*)" remotes_map = ( ("bitbucket", r"https://bitbucket.org/(?P<value>[^/]+/[^/]+)"),