Skip to content

Userscripts to add a "Copy commit reference" button to commit pages of Git hosting providers.

License

Notifications You must be signed in to change notification settings

rybak/copy-commit-reference-userscript

Repository files navigation

Copy commit reference userscripts

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.

Install

All userscripts are available on Greasy Fork. Just click "Install this script" on the page of the individual userscript.

Hosting Screenshot Greasy Fork
GitHub GitHub.png
Bitbucket Bitbucket.png
GitLab GitLab.png
Gitea / Forgejo Gitea.png
Cgit Cgit.png
GitWeb GitWeb.png
Phorge Phorge.png
Gitiles Gitiles.png
Sourcehut Sourcehut.png
Gogs Gogs.png

Contributing

Please see CONTRIBUTING.md for details.

Goals

  • 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

Non-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.

Repository mirrors

Code of the userscripts is available on the following mirrors:

About

Userscripts to add a "Copy commit reference" button to commit pages of Git hosting providers.

Topics

Resources

License

Stars

Watchers

Forks