stable

Clone or download

Read-only

fix: encode file path ui-router style

part of story #31151 Edit the description comment in text only Looks like ui-router has a unique way to format parameters [0] when they contain some characters like '/' or '~'. With the current formatting, ui-router is not able to route the request to the file-diff view when the file path contains one of those characters. [0] https://github.com/angular-ui/ui-router/blob/461d7b2499ed95c59b325d7964fdc240367055a9/src/locationServices.ts#L30 How to reproduce: - Create a pull-request containing changes in files being in some folders, like src/components/my-file.ts - Add a comment in this file - Go back to the vue overview - Click on the file url in the comment --> You are redirected to the list of the pull-requests in the repository How to test: - Do the same steps --> You are redirected to the file, and the editor has scrolled to the comment Change-Id: Ifad4974323d5d65b59443c69dd5a972700659145

Modified Files

Name
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Threads/CommentPresenterBuilder.ts +4 −1 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-overview/src/helpers/file-path-formatter.test.ts +29 −0 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-overview/src/helpers/file-path-formatter.ts +32 −0 Go to diff View file