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

Conversation

dale3h
Copy link
Contributor

@dale3h dale3h commented May 11, 2019

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:

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:

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)
@Mottie Mottie merged commit e7d1327 into Mottie:master May 13, 2019
@Mottie
Copy link
Owner

Mottie commented May 13, 2019

Hi @dale3h!

Awesome! Thanks for your contribution. I appreciate the help!

@Mottie
Copy link
Owner

Mottie commented May 13, 2019

Please do me one more favor.

I've updated the wiki page with this addition. Please read over the updates I made, and fix or improve the documentation as needed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants