ignore wip/ branches from git
This commit is contained in:
parent
5c8c4432fb
commit
aef9b6d190
1
init.rb
1
init.rb
|
@ -4,6 +4,7 @@ require_dependency 'welcome_controller_patch'
|
|||
require_dependency 'project_model_patch'
|
||||
require_dependency 'mailer_patch'
|
||||
require_dependency 'attachments_controller_patch'
|
||||
require_dependency 'git_adapter_patch'
|
||||
|
||||
Redmine::Plugin.register :redmine_entrouvert do
|
||||
name 'Redmine Entr\'ouvert plugin'
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
require 'redmine/scm/adapters/git_adapter.rb'
|
||||
|
||||
# skip wip/ branches
|
||||
|
||||
module Redmine
|
||||
module Scm
|
||||
module Adapters
|
||||
class GitAdapter
|
||||
|
||||
alias_method :branches_original, :branches
|
||||
|
||||
def branches(*args)
|
||||
all_branches = branches_original(*args)
|
||||
all_branches.find_all { |b| !b.start_with("wip/") }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue