Use route helpers to construct URLs in ChatMessage module
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Description
In various classes in ChatMessage module we manually construct URLs. Example (from ChatMessage::PushMessage):
def branch_url
"#{project_url}/commits/#{ref}"
end
This has a big disadvantage: when our routes change these URLs will potentially break
Proposal
Use Rails route helpers to have a single source of truth.
Links / references
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8641/diffs#note_21949047
Edited by 🤖 GitLab Bot 🤖