Created
September 9, 2013 19:34
-
-
Save chrisfsmith/6500387 to your computer and use it in GitHub Desktop.
Automator service applescript that opens a JIRA issue in chrome. Use it from Launchbar.
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
on run {input, parameters} | |
set sedCommand to "echo \"" & input & "\" | sed \"s/^[ ]*//;s/[ ]*$//;s/[ ]\\{1,\\}/-/g;s/-\\{1,\\}/-/\"" as string | |
set sedResult to do shell script sedCommand | |
set currentURL to "https://bloomhealthco.atlassian.net/browse/" & sedResult | |
if currentURL is not "" then | |
tell application "Google Chrome" | |
activate | |
if (exists window 1) and (URL of active tab of window 1 is "chrome://newtab/") then | |
tell window 1 to set URL of active tab to currentURL | |
else | |
open location currentURL | |
end if | |
end tell | |
end if | |
return input | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment