{"thread":{"id":"62131","subject":"[ANNOUNCE] Button \"Copy commit reference\" for Git hosting sites","startedAt":"2024-09-18T01:41:19Z","lastAt":"2024-09-18T01:41:19Z","messageCount":1,"participants":["Andrei Rybak"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"502974","messageId":"8f581759-34d2-45e4-bace-45669dbdb875@gmail.com","threadId":"62131","inReplyTo":null,"subject":"[ANNOUNCE] Button \"Copy commit reference\" for Git hosting sites","fromName":"Andrei Rybak","fromEmail":"rybak.a.v@gmail.com","sentAt":"2024-09-18T01:41:14Z","receivedAt":"2024-09-18T01:41:19Z","isPatch":false,"sender":{"key":"rybak.a.v@gmail.com","avatar":"https://avatars.githubusercontent.com/u/624072?v=4"},"body":"I am pleased to announce \"Git: copy commit reference\" -- a collection of\nuserscripts, which make it easy to copy-paste commit references from\nweb UIs of the Git hosting providers.  Example of a commit reference:\n\n\t1f0fc1d (pretty: implement 'reference' format, 2019-11-20)\n\nSuch references are a good way of providing context in commit\nmessages.[1]  The main goal of the project is to allow users of Git\nhosting sites to produce better commit messages by giving them an easy,\none-click way of creating commit references using websites of the\nhosting providers.  Here's a screenshot of how the button looks on\nGitHub, for example:\n\n\thttps://raw.githubusercontent.com/rybak/copy-commit-reference-userscript/main/Documentation/GitHub.png\n\n\nHow to install?\n===============\n\nTry the userscripts out by installing them via Greasy Fork:\n\n\thttps://greasyfork.org/en/scripts?set=588773\n\nIf you are not familiar with userscripts for browsers, they are like\nextensions inside another browser extension, called a user script\nmanager.[2]\n\n\nWhat do the userscripts do?\n===========================\n\nThe userscripts add a button \"Copy commit reference\" to commit pages of\nGit hosting sites.  Clicking the button puts both plain text and HTML\ninto the clipboard.  The HTML content has clickable links to the\nwebsite.  This is useful in rich text editors, e.g. in HTML emails,\nSlack, MS Teams, Confluence, visual mode of Jira, etc.\n\n\nWhich sites are supported?\n==========================\n\nThe following hosting providers are supported at the time of writing:\n\n   - GitHub\n   - GitLab\n   - Bitbucket Cloud and Bitbucket Server\n   - Gitea and Forgejo\n   - Phorge (fork of Phabricator)\n   - Gitiles\n   - Sourcehut\n   - Cgit\n   - GitWeb\n   - Gogs\n\n\nDevelopment notes\n=================\n\nAdding support for following Git hosting providers is planned [3]:\n\n   - RhodeCode\n   - Pagure\n   - GitBucket\n\nIf your favorite hosting is missing from the list you can leave feedback\nat the issue trackers.[3]\n\nDuring development I found that compatibility with a wide range of\nversions of the websites can be tricky.  Examples:\n\n   - The latest version of GitWeb is easily available to anyone with\n     `git instaweb`, but one of the well-known public instances --\n     https://repo.or.cz/ -- runs version 2.11.4 with custom patches.\n     Thankfully, the differences relevant to the userscript don't make\n     it too hard to support both versions.\n\n   - Public instances of Gitea/Forgejo have a very wide range of\n     versions, with slightly different HTML layout, and often with custom\n     patches.\n\n   - As far as I know, there are no public (even read-only) instances of\n     Bitbucket Server.  I did manage to test the userscript on several\n     private instances with versions in the range v7.21.* -- v8.9.*.\n\nIf you know publicly available instances of any of the Git hostings\nlisted above (especially Bitbucket Server), please let me know.\n\nI originally planned to post this to git-users mailing list, but it's\ngone now. See <https://github.com/git/git-scm.com/pull/1829> for\ndetails.\n\n\nFootnotes\n=========\n\n[1] \nhttps://lore.kernel.org/git/5264c44fab5d64cdfea8ef9fe2c1088af3d41014.1574211027.git.liu.denton@gmail.com/#\n[2] https://greasyfork.org/en/help/installing-user-scripts\n[3] Issues are tracked mostly on GitHub:\n       https://github.com/rybak/copy-commit-reference-userscript/issues\n     but other sites are also available:\n       https://gitlab.com/andrybak/copy-commit-reference-userscript/-/issues\n       https://gitea.com/andrybak/copy-commit-reference-userscript/issues\n       https://codeberg.org/andrybak/copy-commit-reference-userscript/issues\n"}]}