Truncate suggested branch name to a sensible length while creating branch/MR from issue page
From an issue page, users have an option to create a branch/MR to fix the issue. Though they have an option to edit the branch name, the one GitLab suggest is based on the title of the issue. This can easily be too long, can cause issues during git fetch
or git clone
for users using file systems that have comparatively small value for allowed maximum length. For example, on ext4, I got file name too long
error for the branch 10014-ee-spec-models-ci-build_spec-rb-ee-spec-requests-api-runner_spec-rb-and-ee-spec-services-ci-process_pipeline_service_spec-rb-are-all-failing-ce
Proposal
Truncate the suggested branch name to a reasonable length. We can append a random value at the end to ensure branch conflict doesn't occur.
Since this comes under branching/MRs, I assume it falls under ~Create .
cc @DouweM @andr3 (I am not sure if this is backend or frontend, thus pinging both of you)