Relax autolink prefix rules for Gerrit

The Go project does code review on Gerrit, as per Contribution Guide - The Go Programming Language.

A handful of years ago, its issue tracker was moved to GitHub, so now the two are used together.

The integration works pretty well, for the most part. Gerrit has been taught to recognize syntax like #123 and golang/somerepo#123, so those auto-link to the right place on GitHub.

They would like to do the same in the other direction now: github: add Autolink References for CLs when possible · Issue #47310 · golang/go · GitHub

The way Gerrit CLs (their name for PRs) are referenced is CL 123, with a space. Unfortunately, spaces are not allowed in autolink prefixes:

https://docs.github.com/en/enterprise-server@3.1/github/administering-a-repository/managing-repository-settings/configuring-autolinks-to-reference-external-resources

It would be nice if this could be relaxed. Gerrit is a very commonly used code review system, also used by other big projects such as Android. I don’t think it’s a good idea to just try to tell all of them to change their syntax to something like CL-123 or CL#123 - that would be a lot of effort and churn, and wouldn’t work for all previously written references.

This request is similar to Would be nice if autolink references could support pivotal tracker, but for a different purpose.

1 Like