software-factory
  • Components
  • Guides
  • User documentation
    • Create and configure a new project
    • Contribute to a project on SF
    • Review workflow
    • Short Git introduction
    • Gerrit short user documentation
    • Log Classify User
    • The Config repository
      • Managing resources via the config repository
      • Zuul user documentation
      • Nodepool user documentation
      • Gerritbot notification channels configuration
      • Configure Gerrit git repositories replication
      • Gerrit comments link customisation
      • Publish static web content
      • Firehose
      • System and services metrics
  • Operator documentation
  • Contributor documentation
  • Frequently Asked Questions
software-factory
  • Docs »
  • User documentation »
  • The Config repository »
  • Gerrit comments link customisation
  • View page source

Gerrit comments link customisationΒΆ

You can configure how Gerrit renders links in commit messages by editing the gerrit/commentlinks.yaml file in the config repository:

  • clone the config repository with git
  • edit the gerrit/commentlinks.yaml, for example adding bugzilla.redhat.com:
commentlinks:
  - name: External_Bugzilla_addressing
    match: "BZ:\\s+#?(\\d+)"
    html: "BZ: <a href=\"https://bugzilla.redhat.com/show_bug.cgi?id=$2\">$2</a>"
  • submit and merge the change.

Note

This is just for automatic link rendering in the web interface of Gerrit. To actually update the issue on events, you should write a firehose listener.

Next Previous

© Copyright 2017-2023, Red Hat.

Built with Sphinx using a theme provided by Read the Docs.