This is a collection of userscripts which add a "Copy commit reference" button to commit pages of Git hosting providers. 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. The userscript supports both plain text and HTML, with clickable links to the website. This is useful in rich text editors, e.g. in Slack and visual mode of Jira.
The source code is distributed under the terms of the GNU Affero General Public License, Version 3. See LICENSE.txt for details.
All userscripts are available on Greasy Fork. Just click "Install this script" on the page of the individual userscript.
Screenshot | ||
---|---|---|
GitHub.png | ||
Bitbucket.png | ||
GitLab.png | ||
Gitea.png | ||
Cgit.png | ||
GitWeb.png | ||
Gitiles | Gitiles.png | |
Sourcehut.png | ||
Gogs.png |
Please see CONTRIBUTING.md for details.
- Allow users of Git hosting providers to produce better commit messages by giving them an easy way of creating commit references from web UIs of the hosting providers.
- Provide a way of producing human-readable HTML links, which are paste-able in
rich text editors of wikis and IM apps, like Confluence and Slack.
- Where possible, support HTML links to issue trackers and pull requests.
- Use native-like UI elements (buttons, links, and tooltips) which don't look out of place on the websites of supported Git hostings.
- Provide an abstract class
GitHosting
which:- is easy to subclass
- has just enough points of extension to facilitate other goals
- Adding buttons to copy full commit hashes or other useful strings from the web UIs of Git hostings.
- Overwriting or replacing existing UI. For example, native buttons to copy hashes of commits should continue to work.
Code of the userscripts is available on the following mirrors:
- https://github.com/rybak/copy-commit-reference-userscript
- https://gitlab.com/andrybak/copy-commit-reference-userscript
- https://bitbucket.org/andreyrybak/copy-commit-reference-userscript
- https://codeberg.org/andrybak/copy-commit-reference-userscript
- https://gitea.com/andrybak/copy-commit-reference-userscript