• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Freegle / Iznik / 11495

09 May 2026 07:35AM UTC coverage: 69.06% (-3.8%) from 72.847%
11495

Pull #408

circleci

edwh
docs(migration): mark restartproject and repaircafewales as migrated (PR #408)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pull Request #408: feat(batch): migrate check_cgas, visualise, tn_sync + dry-run improvements

9127 of 10554 branches covered (86.48%)

Branch coverage included in aggregate %.

507 of 663 new or added lines in 16 files covered. (76.47%)

11902 existing lines in 138 files now uncovered.

101630 of 149824 relevant lines covered (67.83%)

19.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/iznik-batch/app/Console/Commands/Integrations/SyncRestartProjectCommand.php
1
<?php
2

3
namespace App\Console\Commands\Integrations;
4

5
use App\Services\RestartProjectService;
6
use Illuminate\Console\Command;
7
use Illuminate\Contracts\Cache\LockTimeoutException;
8
use Illuminate\Support\Facades\Cache;
9

10
class SyncRestartProjectCommand extends Command
11
{
12
    protected $signature = 'integrations:sync-restartproject
13
                            {--dry-run : Log what would change without writing to the database}';
14

15
    protected $description = 'Sync upcoming Restart Project repair events into community events';
16

17
    public function handle(RestartProjectService $service): int
10✔
18
    {
19
        $lock = Cache::lock('integrations:sync-restartproject', 3600);
10✔
20

21
        try {
22
            $lock->block(0);
10✔
NEW
23
        } catch (LockTimeoutException) {
×
NEW
24
            $this->warn('Another instance is already running.');
×
NEW
25
            return Command::SUCCESS;
×
26
        }
27

28
        try {
29
            $dryRun = (bool) $this->option('dry-run');
10✔
30
            $result = $service->sync($dryRun);
10✔
31

32
            $prefix = $dryRun ? '[DRY RUN] Would process' : 'Processed';
10✔
33
            $this->info("{$prefix} {$result['added']} new event(s), {$result['updated']} updated, {$result['deleted']} deleted.");
10✔
34
        } finally {
35
            $lock->release();
10✔
36
        }
37

38
        return Command::SUCCESS;
10✔
39
    }
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc