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
Jérome Perrin
gitlab-ce
Commits
23f383ef
Commit
23f383ef
authored
Dec 08, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect project and namespace changes in list:repos
parent
f3ca92a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
lib/tasks/gitlab/list_repos.rake
lib/tasks/gitlab/list_repos.rake
+4
-3
No files found.
lib/tasks/gitlab/list_repos.rake
View file @
23f383ef
...
@@ -3,9 +3,10 @@ namespace :gitlab do
...
@@ -3,9 +3,10 @@ namespace :gitlab do
scope
=
Project
scope
=
Project
if
ENV
[
'SINCE'
]
if
ENV
[
'SINCE'
]
date
=
Time
.
parse
(
ENV
[
'SINCE'
])
date
=
Time
.
parse
(
ENV
[
'SINCE'
])
warn
"Listing repositories with activity since
#{
date
}
"
warn
"Listing repositories with activity or changes since
#{
date
}
"
project_ids
=
Project
.
where
([
'last_activity_at > ?'
,
date
]).
pluck
(
:id
)
project_ids
=
Project
.
where
(
'last_activity_at > ? OR updated_at > ?'
,
date
,
date
).
pluck
(
:id
).
sort
scope
=
scope
.
where
(
id:
project_ids
)
namespace_ids
=
Namespace
.
where
([
'updated_at > ?'
,
date
]).
pluck
(
:id
).
sort
scope
=
scope
.
where
(
'id IN (?) OR namespace_id in (?)'
,
project_ids
,
namespace_ids
)
end
end
scope
.
find_each
do
|
project
|
scope
.
find_each
do
|
project
|
base
=
File
.
join
(
Gitlab
.
config
.
gitlab_shell
.
repos_path
,
project
.
path_with_namespace
)
base
=
File
.
join
(
Gitlab
.
config
.
gitlab_shell
.
repos_path
,
project
.
path_with_namespace
)
...
...
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