记录谁合并的pull request请求

dev_blankdatabase
huang 9 years ago
parent 5ad063b830
commit 98a8702ba6

@ -14,6 +14,11 @@ module PullRequestsHelper
User.find(user_id).try(:login)
end
# 获取接受PullRequest用户的信息
def accept_user pull_request_id
PullRequest.where(:pull_request_id => pull_request_id).first
end
def get_state state
case state
when "open","reopened"

@ -24,7 +24,9 @@
<% else %>
<% if @request.state == "merged" %>
<div class="merge-commit-option mt15">
<span class="fontGrey3 fb" style="font-size:13px;"><%#= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "link-blue" %>于<%= time_tag(@request.created_at) %> 前合并</span><br />
<% unless accept_user(@request.id).blank? %>
<span class="fontGrey3 fb" style="font-size:13px;"><%= link_to User.find(accept_user(@request.id).user_id), user_path(accept_user(@request.id).user_id), :class => "link-blue" %> 于 <%= time_tag(accept_user(@request.id).created_at) %> 前合并</span><br />
<% end %>
<p class="fontGrey2 mt5">改动已合并至<%= @request.target_branch %></p>
</div>
<% else %>

Loading…
Cancel
Save