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

Hotkey for copying the most recent hash stub #2471

Closed
asacainbbc opened this issue Oct 2, 2019 · 5 comments
Closed

Hotkey for copying the most recent hash stub #2471

asacainbbc opened this issue Oct 2, 2019 · 5 comments

Comments

@asacainbbc
Copy link

asacainbbc commented Oct 2, 2019

Provide a hotkey for copying the most recent commit hash stub from a pull request. In my use case it's for accessing resources with names identical to the current hash stub related to their commit.

It'd also allow me to avoid the horror that is trying to copy it from the page this

Even if you do copy it from that part of the page, it comes suffixed with a space.

Example URL:

Any pull request URL

https://github.com/$USERNAME/$REPONAME/pull/$NUM I suppose

@fregante
Copy link
Member

fregante commented Oct 3, 2019

Can you explain your use case a little more? I don’t understand

@asacainbbc
Copy link
Author

Sure! As a normal part of my day to day development I'll need to grab the stub from the SHA hash of the latest commit in a pull request, these stubs are then used in the URL to the deployed version of that commit.

It's really fiddly to copy that hash stub, especially with a trackpad. If there were a copy icon (like so, shown underneath) that would also work.
image

Anything to escape the frustration of accidentally copying the entire bottom half of the pull request page!

@sindresorhus
Copy link
Member

In Chrome, you can just right-click the SHA link and click "Copy" to copy the text (not link).

@asacainbbc
Copy link
Author

I'm using firefox, where that feature isn't available sadly 😭

@fregante
Copy link
Member

This seems very specific, we can’t add a button

You can probably improve the selection by adding some padding to that element instead (via Stylus or our own CSS field in the Options page)

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

No branches or pull requests

3 participants