Closed Bug 922226 Opened 6 years ago Closed 6 years ago

redirect when attachments contain reviewboard URLs

Categories

(bugzilla.mozilla.org :: Extensions: BMO, defect)

Production
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: mcote, Assigned: glob)

Details

Attachments

(1 file)

As with bug 916906, it would be great if we could do something similar for ReviewBoard, redirecting when patches contain only a http[s]://reviewboard.mozilla.org/.../ link.
Assignee: nobody → glob
Component: General → Extensions: BMO
Attached patch 922226_1.patchSplinter Review
- no longer require the "is patch" checkbox to be unchecked (checking it is an easy mistake to make)
- add review board requests in the form
    https://reviewboard.allizom.org/r/###
    https://reviewboard-dev.allizom.org/r/###
  where ### is the review number
Attachment #8338264 - Flags: review?(dkl)
Comment on attachment 8338264 [details] [diff] [review]
922226_1.patch

Review of attachment 8338264 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good works as expected. r=dkl

::: extensions/BMO/Extension.pm
@@ +621,5 @@
> +    if ($url =~ m#^https://github\.com/[^/]+/[^/]+/pull/\d+/?$#i) {
> +        $attributes->{mimetype} = GITHUB_PR_CONTENT_TYPE;
> +        $attributes->{ispatch}  = 0;
> +    }
> +    elsif ($url =~ m#^https://reviewboard(?:-dev)\.allizom\.org/r/\d+/?#i) {

Add ? to regexp on commit:

 elsif ($url =~ m#^https://reviewboard(?:-dev)?\.allizom\.org/r/\d+/?#i) {
Attachment #8338264 - Flags: review?(dkl) → review+
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified extensions/BMO/Extension.pm
modified extensions/BMO/lib/Data.pm
modified template/en/default/attachment/edit.html.tmpl
Committed revision 9165.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.