Class: TFSGraph::BranchArchiveHandler
- Inherits:
-
Object
- Object
- TFSGraph::BranchArchiveHandler
- Defined in:
- lib/tfs_graph/branch/branch_archive_handler.rb
Class Method Summary collapse
Class Method Details
.hide_all_archives ⇒ Object
9 10 11 |
# File 'lib/tfs_graph/branch/branch_archive_handler.rb', line 9 def hide_all_archives RepositoryRegistry.project_repository.all.map {|project| hide_moved_archives_for_project(project) } end |
.hide_moved_archives_for_project(project) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/tfs_graph/branch/branch_archive_handler.rb', line 13 def hide_moved_archives_for_project(project) project.branches.group_by(&:path).map do |path, group| next unless group.size > 1 group.each do |branch| branch.hide! if branch.archived? branch.archive! unless branch.archived? end group end end |