Draft: Refactor to use rest API for edit blob
What does this MR do and why?
Refactor to use rest API for edit blob:
- using
/api/:version/projects/:id/repository/files/:file_pathfor submitting blob edits - unblocks showing custom error message (like in a scenario when more than 1 user edits the same file)
References
Screenshots or screen recordings
| Context | Before | After |
|---|---|---|
| Impersonated second user trying to edit the file at the same time | ![]() |
![]() |
| Change to master, change to new branch with MR, change to new branch without MR | Screen_Recording_2025-09-04_at_13.27.34 | Screen_Recording_2025-09-04_at_13.23.35 |
How to set up and validate locally
- Go to Project / Repository
- Choose a file to edit in single file editor.
- Check the following scenarios:
- commit changes directly to master
- commit changes to a new branch with opening an MR
- commit changes to a new branch without opening an MR
- Validate you can perform all of these actions.
- In another browser impersonate a member of the group that has rights to edit files.
- In both browsers open the same file in the repository and go to Edit with single file editor.
- Edit file with one of the users and submit changes.
- After that try to edit the file with the second user, you should get a message about the file changing in the meantime.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #509968
Closes #491263
Edited by Paulina Sedlak-Jakubowska

