Skip to content
Versora

Manual

Inspection

Links in messages, co-authors and Signed-off-by

3 min read

On this page

Commit messages often mention issues (#123), merge requests (!45), Jira keys (PROJ-56) and addresses. Versora turns these references into links that open in the browser. You go from the message straight to the issue, without copying and pasting.

Links appear:

  • in the commit panel (summary and description);
  • in a blame block's card and menu (Open link);
  • in the lists of file history, folder history, comparison and the other inspection screens;
  • in the commit list of the merge request review.

Each link's tooltip says "Open <address> in the browser".

Remote's serviceRecognized references
GitLab#123 (issue), !45 (merge request) and group/project#123
GitHub#123, GH-123 and owner/repo#123
JiraThis repository's project key, for example PROJ-123
Anyhttp:// and https:// addresses written in the message

Automatic links depend on the server registered in Git servers (for GitLab and GitHub) and on the Jira project key in Preferences › Issues. See Servers and accounts and Issues.

For security, only http(s) addresses become links: the message may come from anyone who committed to the repository.

Custom rules

When the team uses another ticketing system, create a rule: a regular expression that finds the reference in the message and the address it opens. Custom rules apply before the automatic ones.

Where to find it

  • Preferences › Links in messages (Ctrl+,).

Step by step

  1. Open Preferences › Links in messages.
  2. Under Custom rules, click Add rule.
  3. Fill in:
    • Name (optional): for example Chamados;
    • Regular expression: in JavaScript syntax, without the slashes. Example: CHAMADO-(\d+);
    • Address (https://…): with $0 for the whole match and $1…$9 for the groups. Example: https://chamados.exemplo.com/ver/$1.
  4. Check it in Test with some text. The field already has a sample ("Fixes #12 and !34 (PROJ-56); see https://example.com/doc (opens another site)"); replace it with any text you want and see the links the rule generates.
  5. Use the rule's box ("Rule enabled") to turn it off without deleting it, and Remove to delete it.

Changes take effect right away.

OptionWhat it doesDefault
Automatic links for GitLab, GitHub and JiraTurns on links for issues, MRs/PRs and Jira keys based on the remote's service. Below it, the screen says which ones apply to the open repository.On
http(s) addresses written in the messageTurns on links for bare addresses in the message.On
Custom rulesRegular expression and address, in list order.None

The link preferences apply to all repositories.

Caveats and messages

  • "Write the expression.": the rule has no regular expression.
  • "Invalid regular expression.": the syntax isn't valid JavaScript. Check parentheses and backslashes.
  • "The expression matches empty text: it would mark the whole message.": the expression matches nothing at all, for example \d*. Use \d+.
  • "The address must start with http:// or https://.": other schemes aren't accepted.
  • "Turned off.": automatic links are turned off.
  • "This repository has no recognized GitLab, GitHub or Jira. Add the server in Git servers or the Jira project key in Preferences › Issues.": the remote isn't on a registered server.
  • "No links in this text.": the test text has no recognized reference.

Co-authors and Signed-off-by

The Co-authored-by and Signed-off-by trailers at the end of the message appear as people, with a colored initial, name and email, not as loose text:

  • Co-author or Co-authors: who made the commit together with the author (Co-authored-by);
  • Signed-off-by: who signed off the commit, "certifying where the code comes from".

They appear in the commit panel, below the description, and in a blame block's card. The description shown leaves these lines out. In blame, a commit with co-authors gets +N next to the author, with the tooltip "With <names>".

Example message:

feat(pedido): calculate shipping by region

Uses the new ZIP code range table.

Co-authored-by: Bruno Lima <[email protected]>
Signed-off-by: Ana Souza <[email protected]>

To add co-authors while writing a commit, see Co-authors.

How to undo

Links and trailers only change how the message is shown. To remove a custom rule, use Remove.

  • Preferences › Links in messages: everything on this page.
  • The company policy can hide this Preferences page or make it read-only, with the id inspectPlus.links in the preferences_hidden and preferences_locked keys. In that case, the page shows "set by your company". See Policy keys.

See also