Skip to content

Allow configuration of commit title limits that decides truncation rules

What does this MR do?

Commit title truncation rules are set according to a pair of hard-coded values. These values determine when the commit title should be truncated to a certain number of characters in favor of displaying the whole message. Currently they're set to not truncate when the commit message is shorter than 100 characters, and truncate to 80 characters otherwise.

This MR makes these hardcoded settings configurable as part of the global application settings.

Are there points in the code the reviewer needs to double check?

The active application settings are already cached, so there seems to be no much difference in terms of performance to pass from hardcoded limit values to an application setting value, although other forms of caching could be considered.

Why was this MR needed?

In certain situations, it is desirable to show more characters in the list view, f.e. if the commit messages for the repository needs to follow a certain pattern that demands the addition of certain tags or keywords, which might limit the number of visible characters available for the actual commit message.

Screenshots (if relevant)

Captura_de_pantalla_2018-02-02_15.53.37

Captura_de_pantalla_2018-02-02_15.53.14

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/42714

Edited by Carlos Paramio

Merge request reports