Class: FightClub::Arena
- Inherits:
-
Object
- Object
- FightClub::Arena
- Defined in:
- lib/fight_club/arena.rb
Instance Method Summary collapse
-
#initialize(base_pull, config = FightClub.config) ⇒ Arena
constructor
A new instance of Arena.
- #start ⇒ Object
Constructor Details
Instance Method Details
#start ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/fight_club/arena.rb', line 17 def start Repository.new.update(FightClub.config.uri, FightClub.config.repo_name) git.checkout("origin/#{base_pull["head"]["ref"]}") return unless base_pull["base"]["ref"] == FightClub.config.master_branch return unless Rebaser.attempt_rebase(base_pull) git.reset_hard("origin/#{base_pull["head"]["ref"]}") pull_requests = client.pull_requests(FightClub.config.repo, :per_page => 200) pull_requests.each do |pr| Merger.new(base_pull, pr, git).execute end true end |