Fix renaming repository when name contains invalid chars under settings
What does this MR do?
Keeps invalid projects suitable for use in URLs
Are there points in the code the reviewer needs to double check?
No.
Why was this MR needed?
500 internal error is displayed without these changes.
What are the relevant issue numbers?
Fixes #19538 (closed)
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together
Merge request reports
Activity
Reassigned to @smcgivern
@smcgivern Could you review the MR for me please? Thanks :)
@dbalexandre looks good, just a couple of questions.
Reassigned to @dbalexandre
Added 34 commits:
-
0d74236b...0c799be6 - 30 commits from branch
master
- 5ea92496 - Fix renaming repository when name contains invalid chars under settings
- 9dfc5b77 - Add feature specs for edit project settings
- e20a92dc - Update CHANGELOG
- 1c8cf120 - Fix Project#to_param to keep invalid project suitable for use in URLs
Toggle commit list-
0d74236b...0c799be6 - 30 commits from branch
Do we need to do this? I find your last screenshot a bit confusing, because the project name is valid but the error says it's invalid.
@smcgivern I've updated the MR with a better approach to handle this. Could you take another look?
Reassigned to @smcgivern
Added 1 commit:
- 9865b8e6 - Fix Project#to_param to keep invalid project suitable for use in URLs
@dbalexandre looks good to me! @rspeicher can you take a look please?
Reassigned to @rspeicher
372 372 373 373 it { expect(@project.to_param).to eq('gitlabhq') } 374 374 end 375 376 context 'with invalid path' do 377 it 'returns previous path to keep project suitable for use in URLs when persisted' do 378 project = create(:empty_project, path: 'gitlab') 379 project.path = 'foo&bar' 380 381 project.valid? Should we make these expectations so it's more explicit what we're doing?
expect(project).not_to be_valid
? And then it can be moved to the Verify phase.Edited by Robert Speicher
Reassigned to @dbalexandre
Added 49 commits:
-
9865b8e6...ac7f3e6a - 45 commits from branch
master
- 487dfad6 - Fix renaming repository when name contains invalid chars under settings
- 7d483f8c - Add feature specs for edit project settings
- 6dfaf4fe - Update CHANGELOG
- ea4d6c87 - Fix Project#to_param to keep invalid project suitable for use in URLs
Toggle commit list-
9865b8e6...ac7f3e6a - 45 commits from branch
Enabled an automatic merge when the build for ea4d6c87 succeeds
mentioned in commit 373145fb
Reassigned to @rspeicher
@rspeicher I've addressed your comments. Can you take another look?
Milestone changed to %8.11
Mentioned in commit ubudzisz/gitlab-ce@373145fb