GitLab: copy commit reference

Adds a "Copy commit reference" button to every commit page on GitLab.

Instalar o script?
Script sugerido do autor

Você também pode gostar de Gitea: copy commit reference.

Instalar o script

Você precisará instalar uma extensão como Tampermonkey, Greasemonkey ou Violentmonkey para instalar este script.

Você precisará instalar uma extensão como Tampermonkey ou Violentmonkey para instalar este script.

Você precisará instalar uma extensão como Tampermonkey ou Violentmonkey para instalar este script.

Você precisará instalar uma extensão como Tampermonkey ou Userscripts para instalar este script.

Você precisará instalar uma extensão como o Tampermonkey para instalar este script.

Você precisará instalar um gerenciador de scripts de usuário para instalar este script.

(Eu já tenho um gerenciador de scripts de usuário, me deixe instalá-lo!)

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

(Eu já possuo um gerenciador de estilos de usuário, me deixar fazer a instalação!)

Autor
andrybak
Instalações hoje
0
Total de instalações
9
Avaliações
0 0 0
Versão
10
Criado
05/10/2023
Atualizado
26/09/2025
Tamanho
6,1 KB
Licença
AGPL-3.0-only
Aplicável a

📋 Features

Adds a "Copy commit reference" button to every commit page. An example of a commit 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 puts both plain text and HTML content to the clipboard. The HTML version of the commit reference includes clickable links to the website. This is useful in rich text editors: Slack, visual mode of Jira, MediaWiki, etc.

🛠️ Custom domain instructions

The userscript is set up with @match rules for public hostings. You might have to manually add your URL as a "User match" in the settings of the userscript.

Tampermonkey instructions
  1. Go to Dashboard in the extension menu
  2. Click "Edit" button in the line of the userscript that you've just installed
  3. Copy the value from @match field of the metadata
  4. Go to the tab "Settings"
  5. Click "Add..." under "User matches"
  6. Paste the copied value
  7. Replace the original domain with the domain of website that you use
  8. Click "OK"

👀 See also

Userscripts for other Git hosting providers are available in set Git: copy commit reference.

If you use IntelliJ-based IDEs (IDEA, PyCharm, CLion, Goland, etc), you might also find plugin Copy Commit Reference useful.

🤝 Contributing

Feel free to leave feedback on Greasy Fork, GitHub, GitLab, Codeberg, or Gitea.

Source code of the userscript is available on GitHub, GitLab, Bitbucket, Codeberg, and Gitea. Pull requests are welcome, see details in file CONTRIBUTING.md.