Ability to accept merge request with GitLab UI
Created by: dzaporozhets
Few notes
- Before use u should run
rake gitlab_enable_automerge
- MR has few states: unverified, can_be_merged, cant_be_merged
- When visit first time it tries to check if MR can be accepted. If true - accept button displayed
- On every push in related branches MR marked us unverified
- If MR is unverified - on first visit it tries to detect if can me accepted
Merge request reports
Activity
Created by: dzaporozhets
@ariejan I've done a first version of
accept merge request with gitlab ui
. Can you review code?By Administrator on 2012-03-30T17:59:31 (imported from GitLab project)
By Administrator on 2012-03-30T17:59:31 (imported from GitLab)
Created by: SaitoWu
@randx not only if a merge request has a attribute change or code update, we need
mark_as_unchecked
.if target branch is changed. we also need to recheck it ..
seems like we need trigger a recheck at
git/hooks
did I miss something?
By Administrator on 2012-03-30T18:37:20 (imported from GitLab project)
By Administrator on 2012-03-30T18:37:20 (imported from GitLab)
1 1 require File.join(Rails.root, "app/models/commit") 2 2 3 3 class MergeRequest < ActiveRecord::Base 4 UNCHECKED = 1 Created by: ariejan
Why use Java-style constants? I personally prefer using strings for this (like acts_as_state_machine does). It adds readability through-out.
By Administrator on 2012-04-16T20:55:16 (imported from GitLab project)
By Administrator on 2012-04-16T20:55:16 (imported from GitLab)
Created by: ariejan
@SaitoWu is right. However, I don't think we should trigger this check at every push.
Instead, when someone visits the MR, we check via AJAX (and possibly resque) if merging is possible or not. We should store this result for the current state (branch, targer branch). If you visit the MR and the branch/target don't match up with our stored value, we must re-check.
@randx Great work! I've added some comments for your consideration. I can't checkout now, but I will test this on sunday.
By Administrator on 2012-03-30T20:36:03 (imported from GitLab project)
By Administrator on 2012-03-30T20:36:03 (imported from GitLab)
19 19 20 20 # Update code for merge requests 21 21 mrs = self.merge_requests.opened.find_all_by_branch(branch_name).all 22 mrs.each { |merge_request| merge_request.reload_code } 22 mrs.each { |merge_request| merge_request.reload_code; merge_request.mark_as_unchecked } Unable to load the diff Created by: netdata-be
I'm testing this request since today, it seems to work well, thanks @randx for implementing the basics. I had one issue:
- the gitlolite-admin project seems to be cloned using user@localhost:gitolite-admin.git however the projects pulled using merge requests are pulled user@my-hostname:xxx.git
Since this ssh connection was never been set up the host key did not exist in my known_hosts Because if this gitlab fails with ERROR 500 making sure the key is added resolved the issue.
Small other question, is really needed to use a git clone to do the merge? I think it is possible to do this on the bare repo itself as well.
By Administrator on 2012-04-04T19:27:53 (imported from GitLab project)
By Administrator on 2012-04-04T19:27:53 (imported from GitLab)
Created by: ariejan
@randx did you look at @netdata's comment on using localhost vs. the configured git host? I think we should use localhost (just like we do when accessing the gitolite-admin repo) to avoid confusion.
By Administrator on 2012-04-13T07:35:43 (imported from GitLab project)
By Administrator on 2012-04-13T07:35:43 (imported from GitLab)
Created by: dzaporozhets
@vsizov is working on this feature now. Hope we get it for v2.4
By Administrator on 2012-04-16T16:44:26 (imported from GitLab project)
By Administrator on 2012-04-16T16:44:26 (imported from GitLab)
Created by: vsizov
i almost have done this feature. I also planning change the algorithm of merge because now auto-merge do not work for very large repo.
By Administrator on 2012-04-16T21:03:18 (imported from GitLab project)
By Administrator on 2012-04-16T21:03:18 (imported from GitLab)
- lib/tasks/gitlab_enable_automerge.rake 0 → 100644
1 desc "Give gitlab user full access to every repo" 2 task :gitlab_enable_automerge => :environment do Created by: dzaporozhets
@vsizov should we expect it for current release? Or 3.0?
By Administrator on 2012-04-19T20:16:34 (imported from GitLab project)
By Administrator on 2012-04-19T20:16:34 (imported from GitLab)