Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15439474
D12749.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
745 B
Referenced Files
None
Subscribers
None
D12749.id.diff
View Options
diff --git a/src/applications/differential/customfield/DifferentialRevisionIDField.php b/src/applications/differential/customfield/DifferentialRevisionIDField.php
--- a/src/applications/differential/customfield/DifferentialRevisionIDField.php
+++ b/src/applications/differential/customfield/DifferentialRevisionIDField.php
@@ -32,6 +32,14 @@
}
public function parseValueFromCommitMessage($value) {
+ // If the value is just "D123" or similar, parse the ID from it directly.
+ $value = trim($value);
+ $matches = null;
+ if (preg_match('/^[dD]([1-9]\d*)\z/', $value, $matches)) {
+ return (int)$matches[1];
+ }
+
+ // Otherwise, try to extract a URI value.
return self::parseRevisionIDFromURI($value);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mar 27 2025, 7:42 AM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7706905
Default Alt Text
D12749.id.diff (745 B)
Attached To
Mode
D12749: Allow Phabricator to parse bare revision IDs from "Differential Revision:" fields
Attached
Detach File
Event Timeline
Log In to Comment