Adds a "Copy commit reference" button/link to commit pages of GitHub. An example of a reference is:
The reference format in git.git repository has been implemented in commit 1f0fc1d (pretty: implement 'reference' format, 2019-11-20).
Such references are a good way of providing context in commit messages.
📋 Features
The script puts both plain text and HTML content to the clipboard. The HTML version of the commit reference includes clickable links to the Git hosting website. This is useful in rich text editors, e.g. in Slack and visual mode of Jira.
If you use IntelliJ-based IDEs (IDEA, PyCharm, CLion, Goland, etc), you might also find plugin Copy Commit Reference useful.
🛠️ Custom domain instructions
The userscript is set up with @match
rule for GitHub. You might have to manually add your URL as a "User match" in the settings of the userscript.
Tampermonkey instructions
- Go to Dashboard in the extension menu
- Click "Edit" button in the line of the script that you've just installed
- Copy the value from
@match
field of the metadata
- Go to the tab "Settings"
- Click "Add..." under "User matches"
- Paste the copied value
- Replace the original domain with the domain of website that you use
- Click "OK"
🤝 Contributing
Feel free to leave feedback on Greasy Fork镜像 or GitHub.
Source code of the userscript is available on GitHub. Pull requests are welcome, see details in CONTRIBUTING.md.