feat: Change open MR to use merge request id as the query param
What does this MR do and why?
This MR changes the Web IDE route for merge requests:
- from using the merge request ID as route parameters to query parameters.
- to include file path so that the exact file is opened in the WebIDE.
- New URL structure:
/ide/project/:project_id/-/path/to/file.rb?merge_request_id=:merge_request_id - The old structure
/ide/project/:project_id/merge_requests/:merge_request_idis still supported for backward compatibility
Screenshots or screen recordings
No UI changes, this is a routing change. The Web IDE interface remains the same, only the URL structure changes.
How to set up and validate locally
- Start your GDK environment
- Navigate to any merge request in a project
- Click "Open in Web IDE" from the merge request page
- Verify the URL uses query parameters for MR id and include file path
- For forked projects, verify
target_projectis included in query params when source and target differ
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 #321614
Edited by aishahsofea