ability to attach branch to issue

This commit is contained in:
gitlabhq 2011-11-24 08:08:20 -05:00
parent b4c40c212c
commit ee2d3de1a6
7 changed files with 149 additions and 48 deletions

View file

@ -9,7 +9,7 @@ class IssuesController < ApplicationController
before_filter :authorize_read_issue!
before_filter :authorize_write_issue!, :only => [:new, :create, :close, :edit, :update, :sort]
respond_to :js
respond_to :js, :html
def index
@issues = case params[:f].to_i
@ -41,6 +41,13 @@ class IssuesController < ApplicationController
@notes = @issue.notes.inc_author.order("created_at DESC").limit(20)
@note = @project.notes.new(:noteable => @issue)
@commits = if @issue.branch_name && @project.repo.heads.map(&:name).include?(@issue.branch_name)
@project.repo.commits_between("master", @issue.branch_name)
else
[]
end
respond_to do |format|
format.html
format.js { respond_with_notes }