Apply find/replace functionallity on comments and messages
Putting a CommentLink section in the gerrit.config file will run a custom find/replace on comments and messages in Gerrit. This is useful for turning specific strings into links to a bug tracking system. Bug: issue 19 Signed-off-by: Brad Larson <bklarson@gmail.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
package com.google.gerrit.client.changes;
|
||||
|
||||
import com.google.gerrit.client.Gerrit;
|
||||
import com.google.gerrit.client.reviewdb.ChangeMessage;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
@@ -25,7 +26,7 @@ public class MessagePanel extends Composite {
|
||||
public MessagePanel(final ChangeMessage msg) {
|
||||
final Widget l =
|
||||
new SafeHtmlBuilder().append(msg.getMessage().trim()).wikify()
|
||||
.toBlockWidget();
|
||||
.replaceAll(Gerrit.getConfig().getCommentLinks()).toBlockWidget();
|
||||
l.setStyleName("gerrit-ChangeMessage-Message");
|
||||
initWidget(l);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user