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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
430d3ad4
Commit
430d3ad4
authored
Dec 23, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update output of gitlab:enable_automerge
parent
224da711
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
5 deletions
+31
-5
lib/tasks/gitlab/enable_automerge.rake
lib/tasks/gitlab/enable_automerge.rake
+31
-5
No files found.
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
""
Project
.
find_each
do
|
project
|
if
project
.
repo_exists?
&&
!
project
.
satellite
.
exists?
puts
"Creating satellite for
#{
project
.
name
}
..."
.
green
project
.
satellite
.
create
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
}
... "
unless
project
.
repo_exists?
puts
"skipping, because the repo is empty"
.
magenta
next
end
puts
"Done!"
.
green
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
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