|
15 | 15 | =========================================================================*/
|
16 | 16 |
|
17 | 17 | //error_reporting(0); // disable error reporting
|
18 |
| -use Bernard\Message\PlainMessage; |
19 |
| -use Bernard\Producer; |
20 |
| -use Bernard\QueueFactory\PersistentFactory; |
21 |
| -use Bernard\Serializer; |
22 | 18 | use CDash\Config;
|
23 | 19 | use CDash\Middleware\Queue;
|
24 | 20 | use CDash\Middleware\Queue\DriverFactory as QueueDriverFactory;
|
|
28 | 24 | use CDash\Model\BuildFile;
|
29 | 25 | use CDash\Model\PendingSubmissions;
|
30 | 26 | use CDash\Model\Project;
|
| 27 | +use CDash\Model\Repository; |
31 | 28 | use CDash\Model\Site;
|
| 29 | +use CDash\Service\RepositoryService; |
| 30 | +use CDash\ServiceContainer; |
| 31 | +use GuzzleHttp\Client as HttpClient; |
32 | 32 | use Ramsey\Uuid\Uuid;
|
33 |
| -use Symfony\Component\EventDispatcher\EventDispatcher; |
34 | 33 |
|
35 | 34 | require_once 'include/ctestparser.php';
|
36 | 35 | include_once 'include/common.php';
|
@@ -175,9 +174,25 @@ function do_submit($fileHandleOrSubmissionId, $projectid, $buildid = null,
|
175 | 174 |
|
176 | 175 | // Send the emails if necessary
|
177 | 176 | if ($handler instanceof UpdateHandler) {
|
| 177 | + // TODO: set repository status pending here |
| 178 | + $builds = $handler->getBuilds(); |
| 179 | + |
| 180 | + /** @var Build $build */ |
| 181 | + $build = array_pop($builds); |
| 182 | + $project = new Project(); |
| 183 | + $project->Id = $build->ProjectId; |
| 184 | + $project->Fill(); |
| 185 | + |
| 186 | + $service = Repository::factory($project); |
| 187 | + $client = new HttpClient(); |
| 188 | + |
| 189 | + $repository = new RepositoryService($service, $client); |
| 190 | + $repository->setStatusPending($build); |
| 191 | + |
178 | 192 | send_update_email($handler, $projectid);
|
179 | 193 | sendemail($handler, $projectid);
|
180 | 194 | }
|
| 195 | + |
181 | 196 | if ($handler instanceof TestingHandler ||
|
182 | 197 | $handler instanceof BuildHandler ||
|
183 | 198 | $handler instanceof ConfigureHandler ||
|
|
0 commit comments