Bug 2039767 - Phabricator attachments are not redirectly properly to Phabricator and instead are just showing plain text URL#2621
Merged
Conversation
…Phabricator and instead are just showing plain text URL
There was a problem hiding this comment.
Pull request overview
Adds Phabricator URL support to BMO’s “URL attachment autodetect/external redirect” mechanism so Phabricator revision URL attachments (notably those created by PhabBugz automation) resolve as Phabricator-type attachments instead of displaying as plain text.
Changes:
- Introduces a Phabricator URL regex generator and adds a
Phabricatorentry to%autodetect_attach_urls. - Adds a
can_user_setflag to autodetect entries and prevents auto-assigning mimetypes for URL types that should not be user-set (e.g. Phabricator). - Updates existing autodetect entries (GitHub PR / Google Docs) to explicitly allow user auto-setting via
can_user_set => 1.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| extensions/BMO/lib/Data.pm | Adds Phabricator autodetect rule (regex + metadata) and introduces can_user_set in autodetect configuration. |
| extensions/BMO/Extension.pm | Gates URL-based mimetype auto-assignment on can_user_set for the detected URL type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
cgsheeh
approved these changes
May 15, 2026
Collaborator
cgsheeh
left a comment
There was a problem hiding this comment.
A test for this would be ideal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.