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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
0d65f09f
Commit
0d65f09f
authored
Dec 10, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'report-errors-on-service-creation' of
https://gitlab.com/stanhu/gitlab-ce
parents
3f471532
99fd78d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
CHANGELOG
CHANGELOG
+2
-0
app/services/projects/create_service.rb
app/services/projects/create_service.rb
+4
-2
spec/services/projects/create_service_spec.rb
spec/services/projects/create_service_spec.rb
+7
-0
No files found.
CHANGELOG
View file @
0d65f09f
...
...
@@ -2,6 +2,8 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.3.0 (unreleased)
- Add button to automatically merge a merge request when the build succeeds (Zeger-Jan van de Weg)
- Merge when build succeeds (Zeger-Jan van de Weg)
- Provide better diagnostic message upon project creation errors (Stan Hu)
- Bump gollum-lib to 4.1.0 (Stan Hu)
- Fix broken group avatar upload under "New group" (Stan Hu)
- Update project repositorize size and commit count during import:repos task (Stan Hu)
...
...
app/services/projects/create_service.rb
View file @
0d65f09f
...
...
@@ -64,8 +64,10 @@ module Projects
after_create_actions
if
@project
.
persisted?
@project
rescue
@project
.
errors
.
add
(
:base
,
"Can't save project. Please try again later"
)
rescue
=>
e
message
=
"Unable to save project:
#{
e
.
message
}
"
Rails
.
logger
.
error
(
message
)
@project
.
errors
.
add
(
:base
,
message
)
if
@project
@project
end
...
...
spec/services/projects/create_service_spec.rb
View file @
0d65f09f
...
...
@@ -49,6 +49,13 @@ describe Projects::CreateService, services: true do
it
{
expect
(
@project
.
namespace
).
to
eq
(
@group
)
}
end
context
'error handling'
do
it
'handles invalid options'
do
@opts
.
merge!
({
default_branch:
'master'
}
)
expect
(
create_project
(
@user
,
@opts
)).
to
eq
(
nil
)
end
end
context
'wiki_enabled creates repository directory'
do
context
'wiki_enabled true creates wiki repository directory'
do
before
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