Skip to content

Commit 565ef38

Browse files
AdambeanAdamReece-WebBox
authored andcommitted
Taken away use of "without_project_bots" option in the users API option as this is not yet supported in the upstream PHP GitLab API client component.
#50 (Reverse this commit should this option become available.)
1 parent 5b9bb99 commit 565ef38

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/LdapSyncCommand.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,16 @@ private function deployGitlabUsersAndGroups(array $config, string $gitlabInstanc
13551355
$this->logger?->notice("Finding all existing Gitlab users...");
13561356
$p = 0;
13571357

1358-
while (is_array($gitlabUsers = $gitlab->users()->all(["page" => ++$p, "per_page" => 100, "without_project_bots" => true])) && [] !== $gitlabUsers) {
1358+
while (is_array($gitlabUsers = $gitlab->users()->all([
1359+
"page" => ++$p,
1360+
"per_page" => 100,
1361+
/* Option not yet supported in the PHP GitLab API client component:
1362+
"without_project_bots" => true,
1363+
* See:
1364+
* - https://github.com/Adambean/gitlab-ce-ldap-sync/issues/50
1365+
* - https://github.com/GitLabPHP/Client/issues/810
1366+
*/
1367+
])) && [] !== $gitlabUsers) {
13591368
/** @var array<int, GitlabUserArray> $gitlabUsers */
13601369
foreach ($gitlabUsers as $i => $gitlabUser) {
13611370
$n = $i + 1;

0 commit comments

Comments
 (0)