Last active
September 19, 2017 16:39
-
-
Save mmedvede/47251b50c8178270fcc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Terminator plugin that turns all gerrit IDs into clickable links. | |
# Place this into ~/.config/terminator/plugins/ and then enable it in | |
# terminator preferences. | |
# mmedvede | |
import terminatorlib.plugin as plugin | |
AVAILABLE = ['GerritIDURLHandler'] | |
class GerritIDURLHandler(plugin.URLHandler): | |
capabilities = ['url_handler'] | |
handler_name = 'gerritid' | |
nameopen = "Open gerrit review" | |
namecopy = "Copy review URL" | |
match = '\\b(I[0-9a-fA-F]{40})\\b' | |
def callback(self, url): | |
return('https://review.openstack.org/#/q/%s' % url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment