Merge branch 'gitlab_guange' into develop
This commit is contained in:
commit
29d950c187
|
@ -24,6 +24,7 @@
|
|||
<strong class="str-truncated">
|
||||
<a class="commit-row-message"><%= textilizable(truncate_at_line_break(changeset.message)) %></a>
|
||||
</strong>
|
||||
|
||||
<div class="pull-right" title="修订号">
|
||||
<%= h truncate(changeset.short_id.to_s, :length => 20) %>
|
||||
</div>
|
||||
|
@ -31,13 +32,29 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="commit-row-info">
|
||||
<% if !user_commit_rep(changeset.author_email).nil? %>
|
||||
<a class="commit-author-link has_tooltip"> <span class="commit-author-name">
|
||||
<%= image_tag(url_to_avatar(user_commit_rep(changeset.author_email)), :width => "20", :height => "20", :class => "fl portraitRadius mt2 ml4 mr5") %>
|
||||
<%= link_to user_commit_rep(changeset.author_email), user_path(user_commit_rep(changeset.author_email)), :length => 30 %></span></a>
|
||||
提交于
|
||||
<div class="committed_ago">
|
||||
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %> 前</time>
|
||||
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %>
|
||||
前
|
||||
</time>
|
||||
|
||||
</div>
|
||||
<% else %>
|
||||
<span class="commit-author-name"><%= changeset.author_email %></span>
|
||||
提交于
|
||||
<div class="committed_ago">
|
||||
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %>
|
||||
前
|
||||
</time>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -6,7 +6,9 @@ namespace :gitlab do
|
|||
users = User.find_by_sql("select * from users where gid is null")
|
||||
s = Trustie::Gitlab::Sync.new
|
||||
g = Gitlab.client
|
||||
logger = Logger.new('./log/add_gid.log', 'daily') #按天生成
|
||||
users.each do |user|
|
||||
begin
|
||||
us = g.get("/users?search=#{user.mail}")
|
||||
puts user.mail
|
||||
if us.blank?
|
||||
|
@ -25,6 +27,10 @@ namespace :gitlab do
|
|||
end
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
logger.error("userid=#{user.id},mail=#{user.mail},login=#{user.login},error=#{e}")
|
||||
puts e
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue