Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
d32802c7
Commit
d32802c7
authored
Jul 16, 2018
by
Jamie Schembri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #49272 - Sanitize git URL in import errors
parent
25af7197
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
app/services/projects/import_service.rb
app/services/projects/import_service.rb
+1
-1
changelogs/unreleased/49272-sanitize-git-url-in-import-errors.yml
...gs/unreleased/49272-sanitize-git-url-in-import-errors.yml
+5
-0
spec/services/projects/import_service_spec.rb
spec/services/projects/import_service_spec.rb
+2
-2
No files found.
app/services/projects/import_service.rb
View file @
d32802c7
...
@@ -23,7 +23,7 @@ module Projects
...
@@ -23,7 +23,7 @@ module Projects
success
success
rescue
=>
e
rescue
=>
e
error
(
"Error importing repository
#{
project
.
import_url
}
into
#{
project
.
full_path
}
-
#{
e
.
message
}
"
)
error
(
"Error importing repository
#{
project
.
safe_
import_url
}
into
#{
project
.
full_path
}
-
#{
e
.
message
}
"
)
end
end
private
private
...
...
changelogs/unreleased/49272-sanitize-git-url-in-import-errors.yml
0 → 100644
View file @
d32802c7
---
title
:
Sanitize git URL in import errors
merge_request
:
author
:
Jamie Schembri
type
:
fixed
spec/services/projects/import_service_spec.rb
View file @
d32802c7
...
@@ -69,7 +69,7 @@ describe Projects::ImportService do
...
@@ -69,7 +69,7 @@ describe Projects::ImportService do
result
=
subject
.
execute
result
=
subject
.
execute
expect
(
result
[
:status
]).
to
eq
:error
expect
(
result
[
:status
]).
to
eq
:error
expect
(
result
[
:message
]).
to
eq
"Error importing repository
#{
project
.
import_url
}
into
#{
project
.
full_path
}
- The repository could not be created."
expect
(
result
[
:message
]).
to
eq
"Error importing repository
#{
project
.
safe_
import_url
}
into
#{
project
.
full_path
}
- The repository could not be created."
end
end
context
'when repository creation succeeds'
do
context
'when repository creation succeeds'
do
...
@@ -141,7 +141,7 @@ describe Projects::ImportService do
...
@@ -141,7 +141,7 @@ describe Projects::ImportService do
result
=
subject
.
execute
result
=
subject
.
execute
expect
(
result
[
:status
]).
to
eq
:error
expect
(
result
[
:status
]).
to
eq
:error
expect
(
result
[
:message
]).
to
eq
"Error importing repository
#{
project
.
import_url
}
into
#{
project
.
full_path
}
- Failed to import the repository"
expect
(
result
[
:message
]).
to
eq
"Error importing repository
#{
project
.
safe_
import_url
}
into
#{
project
.
full_path
}
- Failed to import the repository"
end
end
context
'when repository import scheduled'
do
context
'when repository import scheduled'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment