From 38e01a9b88fba3db82525c2cd4547b963ca2fc37 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 22 Jun 2026 13:33:25 +0800 Subject: [PATCH] feat(tests): enhance label information for triggering extension build tests --- src/StaticPHP/Command/Dev/TestBotCommand.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/StaticPHP/Command/Dev/TestBotCommand.php b/src/StaticPHP/Command/Dev/TestBotCommand.php index e5739a72..6ee1e1e3 100644 --- a/src/StaticPHP/Command/Dev/TestBotCommand.php +++ b/src/StaticPHP/Command/Dev/TestBotCommand.php @@ -253,6 +253,13 @@ class TestBotCommand extends BaseCommand $fmt($targets), ); + $available_labels = implode(', ', [ + '`need-test` (gate)', + '`test/linux` `test/windows` `test/macos` (platform)', + '`test/tier2` (extra arch)', + '`test/php-83` `test/php-84` (PHP version)', + ]); + // Case 1: need-test absent → invite the author to add it if (!$need_test) { return implode("\n", [ @@ -261,11 +268,9 @@ class TestBotCommand extends BaseCommand '', $detected, '', - 'To trigger extension build tests on this PR, add the `need-test` label:', + 'To trigger extension build tests on this PR, add the `need-test` label.', '', - '**Gate**: `need-test`', - '**Platform filter** (optional, default all): `test/linux` `test/windows` `test/macos` · `test/tier2`', - '**PHP version** (optional, default 8.5): `test/php-83` `test/php-84`', + '**Available labels**: ' . $available_labels, ]); } @@ -307,6 +312,7 @@ class TestBotCommand extends BaseCommand '', $detected, '**Active labels**: ' . $labels_str, + '**Available labels**: ' . $available_labels, '**Config**: ' . implode(' + ', $platform_parts) . ' | ' . $php_str, ]); }