mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #1960 from Lux1L/feature/gitlab-subgroup-filtering
feat(gitlab): support nested group filtering using namespace.full_pat…
This commit is contained in:
@@ -255,7 +255,9 @@ export const getGitlabRepositories = async (gitlabId?: string) => {
|
|||||||
if (groupName) {
|
if (groupName) {
|
||||||
const isIncluded = groupName
|
const isIncluded = groupName
|
||||||
.split(",")
|
.split(",")
|
||||||
.some((name) => full_path === name);
|
.some((name) =>
|
||||||
|
full_path.toLowerCase().startsWith(name.trim().toLowerCase())
|
||||||
|
);
|
||||||
|
|
||||||
return isIncluded && kind === "group";
|
return isIncluded && kind === "group";
|
||||||
}
|
}
|
||||||
@@ -422,7 +424,12 @@ export const testGitlabConnection = async (
|
|||||||
const { full_path, kind } = repo.namespace;
|
const { full_path, kind } = repo.namespace;
|
||||||
|
|
||||||
if (groupName) {
|
if (groupName) {
|
||||||
return groupName.split(",").some((name) => full_path === name);
|
return groupName
|
||||||
|
.split(",")
|
||||||
|
.some((name) =>
|
||||||
|
full_path.toLowerCase().startsWith(name.trim().toLowerCase())
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
return kind === "user";
|
return kind === "user";
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user