diff --git a/bin/publish-latest-branch-build.php b/bin/publish-latest-branch-build.php --- a/bin/publish-latest-branch-build.php +++ b/bin/publish-latest-branch-build.php @@ -236,12 +236,24 @@ // We have a Differentials revision under review! + // Get the Revision title, if readable by the bot. + // Otherwise, fallback to the last git commit title. + $result = $phorge_api->callMethodSynchronous( + 'differential.revision.search', + [ + 'constraints' => [ + 'ids' => [$phorge_differential_id], + ], + ] + ); + $revision_title = $result['data'][0]['fields']['title'] ?? $git_commit_title; + $telegram_chat_content = implode("\n", [ // In Telegram, normal text must be escaped. Link destinations must not be escaped. TelegramStupidSDK::escapeMarkdownV2("⚙ Dear Android hackers, please test, review and accept:"), "", // TODO: understand why Telegram does not render "**asd**" as bold text lol. - "**" . TelegramStupidSDK::escapeMarkdownV2($git_commit_title) . "**", + "*" . TelegramStupidSDK::escapeMarkdownV2($revision_title) . "*", TelegramStupidSDK::escapeMarkdownV2("https://gitpull.it/$phorge_document_id"), "", TelegramStupidSDK::escapeMarkdownV2("Here the related fresh test builds:"),