Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Privacy
Imprint
Contact
Login methods
Sign in
Toggle navigation
Menu
Open sidebar
projects.thm.de
GitLab
Commits
430d3ad4
Commit
430d3ad4
authored
Dec 23, 2012
by
Riyad Preukschas
Browse files
Update output of gitlab:enable_automerge
parent
224da711
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/tasks/gitlab/enable_automerge.rake
View file @
430d3ad4
namespace
:gitlab
do
desc
"GITLAB | Enable auto merge"
task
:enable_automerge
=>
:environment
do
warn_user_is_not_gitlab
puts
"Updating repo permissions ..."
Gitlab
::
Gitolite
.
new
.
enable_automerge
puts
"...
#{
"done"
.
green
}
"
puts
""
print
"Creating satellites for ..."
unless
Project
.
count
>
0
puts
"skipping, because you have no projects"
.
magenta
return
end
puts
""
Project
.
find_each
(
batch_size:
100
)
do
|
project
|
print
"
#{
project
.
name_with_namespace
.
yellow
}
... "
Project
.
find_each
do
|
project
|
if
project
.
repo_exists?
&&
!
project
.
satellite
.
exists?
puts
"Creating satellite for
#{
project
.
name
}
..."
.
green
unless
project
.
repo_exists?
puts
"skipping, because the repo is empty"
.
magenta
next
end
if
project
.
satellite
.
exists?
puts
"exists already"
.
green
else
puts
""
project
.
satellite
.
create
print
"... "
if
$?
.
success?
puts
"created"
.
green
else
puts
"error"
.
red
end
end
end
puts
"Done!"
.
green
end
namespace
:satellites
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