From a6689f9e1575f59dbc119f2ba89b7dd573459714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Tue, 22 Mar 2016 10:38:32 +0900 Subject: [PATCH] Add matchers for external references on launchpad This commit adds matchers for bugs and blueprints on launchpad, and replicates the behavior of gerrit UI. Change-Id: Ic721a90df029d5b82d30c7d7193170488c5c0406 --- examples/openstack-gertty.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/examples/openstack-gertty.yaml b/examples/openstack-gertty.yaml index 84fc5f8..3014bc0 100644 --- a/examples/openstack-gertty.yaml +++ b/examples/openstack-gertty.yaml @@ -60,6 +60,18 @@ commentlinks: - search: text: "{id}" query: "change:{id}" + # Match external references to bugs on Launchpad + - match: "(?P(?:[Cc]loses|[Pp]artial|[Rr]elated)-[Bb]ug *: *#?(?P\\d+))" + replacements: + - link: + text: "{bug_str}" + url: "https://launchpad.net/bugs/{bug_id}" + # Match external references to blueprints on Launchpad + - match: "blueprint +(?P[\\w\\-.]+)" + replacements: + - link: + text: "blueprint {blueprint}" + url: "https://blueprints.launchpad.net/openstack/?searchtext={blueprint}" # This is the query used for the list of changes when a project is # selected. The default is "status:open". If you don't want to see