Skip to content

Commit e85a991

Browse files
committed
Fix hook updating issue
1 parent 878b34e commit e85a991

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Service/GitHubUserMigrationWorker.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ static function ($hook) {
125125
return \strlen($a['config']['url']) - \strlen($b['config']['url']);
126126
});
127127

128+
$this->logger->debug(\count($currentHooks).' current hooks (sorted)', ['hooks' => $currentHooks]);
129+
128130
$hookData = $this->getGitHubHookData();
129131
$hasValidHook = false;
130132
foreach ($currentHooks as $index => $hook) {
@@ -146,8 +148,8 @@ static function ($hook) {
146148
$this->request($token, 'PATCH', 'repos/'.$repoKey.'/hooks/'.$hook['id'], $hookData);
147149
$changed = true;
148150
} elseif (!$package->isAutoUpdated()) {
149-
// if the hook looks correct but package is not marked auto-updated, we do not mark it valid so it gets recreated below
150-
continue;
151+
// if the hook looks correct but package is not marked auto-updated, we abort so it all gets recreated below
152+
break;
151153
}
152154

153155
$hasValidHook = true;

0 commit comments

Comments
 (0)