aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred Wingate <parona@protonmail.com>2023-11-27 12:04:35 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2023-12-08 20:32:42 +0200
commit26f4edff6c429ff7b0d6583683a1a1d1954817e1 (patch)
treefe682fa505c8a0d8f0dac2f180730172f09e6d83 /src
parentchecks.git: Set tarfile filter (diff)
downloadpkgcheck-26f4edff6c429ff7b0d6583683a1a1d1954817e1.tar.gz
pkgcheck-26f4edff6c429ff7b0d6583683a1a1d1954817e1.tar.bz2
pkgcheck-26f4edff6c429ff7b0d6583683a1a1d1954817e1.zip
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@protonmail.com> Closes: https://github.com/pkgcore/pkgcheck/pull/637 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/pkgcheck/checks/metadata_xml.py4
1 files changed, 3 insertions, 1 deletions
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>[^/]+/[^/]+)"),