With custom commands, you are one shortcut away to run commands thanks to the Quick Launch (Ctrl+P, ⌘+P).
Custom commands can be configured in File > Preferences > Custom commands, or by editing the json file custom-commands.json located in AppData/Local/Fork on Windows and ~/Library/Application Support/com.DanPristupov.Fork/custom-commands.json on MacOS.
Please share your own custom commands :)
Fork commands are posted as comments on this gist. Press CTRL+F to search for commands.
Then, copy-paste the commands you need in custom-commands.json.
Make sure to close Fork before editing the json file.
"Open PR on Github" (for the selected commit):
{ "action" : { "showOutput" : false, "type" : "sh", "waitForExit" : true, "script" : "pr_id=$(git log --oneline -n 1 $sha | grep -o '(#[0-9]\\+' | cut -c3- | tail -1)\nrepo_url=$(git config remote.origin.url | sed -e 's\/git@\/https:\\\/\\\/\/' -e 's\/\\.git$\/\/' | sed -E 's\/(\\\/\\\/[^:]*):\/\\1\\\/\/')\npr_url=$(echo $repo_url\/pull\/$pr_id)\nopen $pr_url" }, "name" : "Open PR on Github", "target" : "revision" }