Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom-hotkeys: Add "{branch}" and "{commit}" #82

Merged
merged 1 commit into from
May 13, 2019

Commits on May 11, 2019

  1. Custom-hotkeys: Add "{branch}" and "{commit}"

    I originally came across this script on search looking for a way to add a hotkey to compare the current branch/tag to the `master` (or other branch). Unfortunately, it does not currently support this, so here it is!
    
    This PR will allow you to easily add a hotkey to compare the current branch/tag/commit to a static branch, for example `master`:
    ```
    {
      "all": [
        { "f1": "#hotkey-settings" },
        { "c m": "{repo}/compare/{branch}...master" },
        { "c m": "{repo}/compare/{commit}...master" }
      ]
    }
    ```
    
    There are a couple of pages where this hotkey is useful:
    - https:/Mottie/GitHub-userscripts/tree/v1.0.230
    - https:/Mottie/GitHub-userscripts/blob/v1.0.230/README.md
    - https:/Mottie/GitHub-userscripts/releases/tag/v1.0.230
    - Mottie@8bfc995
    
    I have tested the hotkey `c m` on a few pages, and it doesn't seem to conflict on any pages that you would intentionally use this hotkey on. The only pages I have found that use the hotkey `c` are:
    - https:/Mottie/GitHub-userscripts/issues (create new issue)
    - https:/Mottie/GitHub-userscripts/pulls (takes you to `/compare` page)
    - https:/Mottie/GitHub-userscripts/commits/master (opens selected commit)
    dale3h authored May 11, 2019
    Configuration menu
    Copy the full SHA
    96f0288 View commit details
    Browse the repository at this point in the history