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
This commit is contained in:
Martin André 2016-03-22 10:38:32 +09:00 committed by James E. Blair
parent 8f38e54747
commit a6689f9e15
1 changed files with 12 additions and 0 deletions

View File

@ -60,6 +60,18 @@ commentlinks:
- search:
text: "{id}"
query: "change:{id}"
# Match external references to bugs on Launchpad
- match: "(?P<bug_str>(?:[Cc]loses|[Pp]artial|[Rr]elated)-[Bb]ug *: *#?(?P<bug_id>\\d+))"
replacements:
- link:
text: "{bug_str}"
url: "https://launchpad.net/bugs/{bug_id}"
# Match external references to blueprints on Launchpad
- match: "blueprint +(?P<blueprint>[\\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