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 @@ -64,12 +64,14 @@ '--short', 'HEAD', ]); +/* $git_commit_title = shell_line('git', [ 'show', '--pretty=format:%s', '-s', 'HEAD', ]); +*/ // Get the branch name, and the Phorge document id of the page to be commented. $phorge_document_id = ''; @@ -235,13 +237,24 @@ if (!empty($phorge_differential_id) && empty(getenv('NO_COMMENT'))) { // We have a Differentials revision under review! + + // Get the Revision $git_commit_revision_title + $result = $phorge_api->callMethodSynchronous( + 'differential.revision.search', + [ + 'constraints' => [ + 'ids' => [$phorge_differential_id], + ], + ] + ); + $revision_title = $result['data'][0]['fields']['revision_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:"),