Page MenuHomeGitPull.it

D233.1778027775.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D233.1778027775.diff

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:"),

File Metadata

Mime Type
text/plain
Expires
Wed, May 6, 02:36 (9 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1882277
Default Alt Text
D233.1778027775.diff (1 KB)

Event Timeline