Add tests for edit_on_gitlab helper
This is a re-do of !2845 (merged), which was reverted due to a bug. This time, I'm adding the tests separately, and then doing the refactor after. This lets us assert the correctness of the tests and ensure that the behavior remains the same before and after refactoring.
This MR will be followed up with !2862 (merged)
Edited by Brian Williams