@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at recaptime-dev/main 43 lines 1.1 kB view raw
1<?php 2 3$conn_w = id(new PhabricatorRepository())->establishConnection('w'); 4 5echo pht('Adding transaction log event groups...')."\n"; 6 7$logs = queryfx_all( 8 $conn_w, 9 'SELECT * FROM %T GROUP BY transactionKey ORDER BY id ASC', 10 'repository_pushlog'); 11foreach ($logs as $log) { 12 $id = $log['id']; 13 echo pht('Migrating log %d...', $id)."\n"; 14 if ($log['pushEventPHID']) { 15 continue; 16 } 17 18 $event_phid = id(new PhabricatorRepositoryPushEvent())->generatePHID(); 19 20 queryfx( 21 $conn_w, 22 'INSERT INTO %T (phid, repositoryPHID, epoch, pusherPHID, remoteAddress, 23 remoteProtocol, rejectCode, rejectDetails) 24 VALUES (%s, %s, %d, %s, %d, %s, %d, %s)', 25 'repository_pushevent', 26 $event_phid, 27 $log['repositoryPHID'], 28 $log['epoch'], 29 $log['pusherPHID'], 30 $log['remoteAddress'], 31 $log['remoteProtocol'], 32 $log['rejectCode'], 33 $log['rejectDetails']); 34 35 queryfx( 36 $conn_w, 37 'UPDATE %T SET pushEventPHID = %s WHERE transactionKey = %s', 38 'repository_pushlog', 39 $event_phid, 40 $log['transactionKey']); 41} 42 43echo pht('Done.')."\n";