From d0214bda508fc6fbef04c541d21a652ee27c5666 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 8 Nov 2023 12:10:08 +0100 Subject: [PATCH] Post number of Psalm errors --- monorepo/scripts/ping-ci-server-with-type-coverage.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/monorepo/scripts/ping-ci-server-with-type-coverage.php b/monorepo/scripts/ping-ci-server-with-type-coverage.php index 4cbda668298..cb656f5d6fe 100644 --- a/monorepo/scripts/ping-ci-server-with-type-coverage.php +++ b/monorepo/scripts/ping-ci-server-with-type-coverage.php @@ -15,10 +15,16 @@ $commit = $argv[2] ?? exit(400); $branch = $argv[3] ?? 'master'; +if (file_exists('psalmout.txt')) { + // Count the number of errors in the output + $psalmErrors = substr_count(file_get_contents('psalmout.txt'), 'ERROR: '); +} + $data = [ 'commit' => $commit, 'report' => file_get_contents('type-coverage.json') ?? exit(404), 'branch' => $branch, + 'psalmErrors' => $psalmErrors ?? null, ]; $url = 'https://ci.hydephp.com/api/github/actions/type-coverage';