Skip to content

Bug 2039767 - Phabricator attachments are not redirectly properly to Phabricator and instead are just showing plain text URL#2621

Merged
dklawren merged 4 commits into
mozilla-bteam:masterfrom
dklawren:2039767
May 15, 2026
Merged

Conversation

@dklawren
Copy link
Copy Markdown
Collaborator

No description provided.

…Phabricator and instead are just showing plain text URL
Copilot AI review requested due to automatic review settings May 15, 2026 18:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Phabricator entry to %autodetect_attach_urls.
  • Adds a can_user_set flag 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.

Comment thread extensions/BMO/lib/Data.pm Outdated
Comment thread extensions/BMO/Extension.pm Outdated
dklawren and others added 2 commits May 15, 2026 14:25
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@dklawren dklawren requested a review from cgsheeh May 15, 2026 18:29
Copy link
Copy Markdown
Collaborator

@cgsheeh cgsheeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test for this would be ideal.

Comment thread extensions/BMO/lib/Data.pm Outdated
@dklawren dklawren merged commit 4c54939 into mozilla-bteam:master May 15, 2026
8 checks passed
@dklawren dklawren deleted the 2039767 branch May 15, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants