Merge branch 'develop' of https://git.trustie.net/Gitlink/forgeplus into develop

This commit is contained in:
jasder 2021-11-05 11:36:51 +08:00
commit c19c83d505
55 changed files with 299 additions and 331 deletions

View File

@ -5,7 +5,7 @@ class Admins::ProjectCategoriesController < Admins::BaseController
def index
sort_by = ProjectCategory.column_names.include?(params[:sort_by]) ? params[:sort_by] : 'created_at'
sort_direction = %w(desc asc).include?(params[:sort_direction]) ? params[:sort_direction] : 'desc'
q = ProjectCategory.includes(:projects).ransack(name_cont: params[:name])
q = ProjectCategory.ransack(name_cont: params[:name])
project_categories = q.result(distinct: true).order("#{sort_by} #{sort_direction}")
@project_categories = paginate(project_categories)

View File

@ -22,7 +22,7 @@ class Organizations::OrganizationsController < Organizations::BaseController
@can_create_project = @organization.can_create_project?(current_user.id)
@is_admin = can_edit_org?
@is_member = @organization.is_member?(current_user.id)
Cache::V2::OwnerCommonService.new(@organization.login, @organization.mail).read
Cache::V2::OwnerCommonService.new(@organization.id).read
end
def create

View File

@ -2,9 +2,11 @@ class ProjectRankController < ApplicationController
# 根据时间获取热门项目
def index
$redis_cache.zunionstore("recent-days-project-rank", get_timeable_key_names)
deleted_data = $redis_cache.smembers("v2-project-rank-deleted")
$redis_cache.zrem("recent-days-project-rank", deleted_data) unless deleted_data.blank?
@project_rank = $redis_cache.zrevrange("recent-days-project-rank", 0, 4, withscores: true)
rescue Exception => e
@project_rack = []
@project_rank = []
end
private

View File

@ -191,7 +191,7 @@ class ProjectsController < ApplicationController
def simple
# 为了缓存活跃项目的基本信息,后续删除
Cache::V2::ProjectCommonService.new(@project.id).reset
Cache::V2::ProjectCommonService.new(@project.id).read
json_response(@project, current_user)
end

View File

@ -52,7 +52,7 @@ class UsersController < ApplicationController
@projects_mirrior_count = user_projects.mirror.size
@projects_sync_mirrior_count = user_projects.sync_mirror.size
# 为了缓存活跃用户的基本信息,后续删除
Cache::V2::OwnerCommonService.new(@user.login, @user.mail).read
Cache::V2::OwnerCommonService.new(@user.id).read
end
def watch_users

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -3,11 +3,12 @@ class Projects::UpdateForm < BaseForm
validates :name, presence: true
validates :name, length: { maximum: 50 }
validates :description, length: { maximum: 200 }
validates :identifier, format: { with: CustomRegexp::REPOSITORY_NAME_REGEX, multiline: true, message: "只能含有数字、字母、下划线且不能以下划线开头和结尾" }
validate do
check_project_category(project_category_id)
check_project_language(project_language_id)
Rails.logger.info project_identifier
Rails.logger.info identifier
check_repository_name(user_id, identifier) unless identifier.blank? || identifier == project_identifier
end

View File

@ -442,6 +442,14 @@ module ApplicationHelper
User.find_by(gitea_uid: gitea_uid)
end
def find_user_in_redis_cache(login, email)
$redis_cache.hgetall("v2-owner-common:#{login}-#{email}")
end
def find_user_in_redis_cache_by_id(id)
$redis_cache.hgetall("v2-owner-common:#{id}")
end
def render_base64_decoded(str)
return nil if str.blank?
Base64.decode64 str

View File

@ -35,6 +35,16 @@ module RepositoriesHelper
end
end
def render_cache_commit_author(author_json)
Rails.logger.info author_json['Email']
if author_json["name"].present? && author_json["email"].present?
return find_user_in_redis_cache(author_json['name'], author_json['email'])
end
if author_json["Name"].present? && author_json["Email"].present?
return find_user_in_redis_cache(author_json['Name'], author_json['Email'])
end
end
def readme_render_decode64_content(str, path)
return nil if str.blank?
begin

View File

@ -0,0 +1,12 @@
class CacheAsyncClearJob < ApplicationJob
queue_as :cache
def perform(type, id=nil)
case type
when "project_common_service"
Cache::V2::ProjectCommonService.new(id).clear
when "owner_common_service"
Cache::V2::OwnnerCommonService.new(id).clear
end
end
end

View File

@ -7,6 +7,8 @@ class CacheAsyncResetJob < ApplicationJob
Cache::V2::PlatformStatisticService.new.reset
when "project_common_service"
Cache::V2::ProjectCommonService.new(id).reset
when "owner_common_service"
Cache::V2::OwnnerCommonService.new(id).reset
when "user_statistic_service"
Cache::V2::UserStatisticService.new(id).reset
end

View File

@ -7,6 +7,8 @@ class CacheAsyncSetJob < ApplicationJob
Cache::V2::PlatformStatisticService.new(params).call
when "project_common_service"
Cache::V2::ProjectCommonService.new(id, params).call
when "owner_common_service"
Cache::V2::OwnnerCommonService.new(id, params).call
when "user_statistic_service"
Cache::V2::UserStatisticService.new(id, params).call
end

View File

@ -84,7 +84,7 @@ class Organization < Owner
after_save :reset_cache_data
def reset_cache_data
Cache::V2::OwnerCommonService.new(self.login, self.mail).reset
Cache::V2::OwnerCommonService.new(self.id).reset
end
def self.build(name, nickname, gitea_token=nil)

View File

@ -128,7 +128,7 @@ class Project < ApplicationRecord
has_many :pinned_projects, dependent: :destroy
has_many :has_pinned_users, through: :pinned_projects, source: :user
has_many :webhooks, class_name: "Gitea::Webhook", primary_key: :gpid, foreign_key: :repo_id
after_create :init_project_common, :incre_user_statistic, :incre_platform_statistic
after_create :incre_user_statistic, :incre_platform_statistic
after_save :check_project_members, :reset_cache_data
before_save :set_invite_code, :reset_unmember_followed, :set_recommend_and_is_pinned
before_destroy :decre_project_common
@ -169,12 +169,8 @@ class Project < ApplicationRecord
end
end
def init_project_common
CacheAsyncResetJob.perform_later("project_common_service", self.id)
end
def decre_project_common
$redis_cache.del("v2-project-common:#{self.id}")
CacheAsyncClearJob.perform_later('project_common_service', self.id)
end
def incre_user_statistic

View File

@ -208,7 +208,7 @@ class User < Owner
validate :validate_password_length
def reset_cache_data
Cache::V2::OwnerCommonService.new(self.login, self.mail).reset
Cache::V2::OwnerCommonService.new(self.id).reset
end
# 用户参与的所有项目

View File

@ -1,12 +1,13 @@
class Cache::V2::OwnerCommonService < ApplicationService
include AvatarHelper
attr_reader :owner_id, :login, :name, :avatar_url, :email
attr_accessor :owner
attr_reader :owner_id, :name
attr_accessor :owner, :login, :email
def initialize(login, email, params={})
@login = login
@email = email
def initialize(owner_id, params={})
@owner_id = owner_id
@email = params[:email]
@name = params[:name]
@avatar_url = params[:avatar_url]
end
def read
@ -14,7 +15,6 @@ class Cache::V2::OwnerCommonService < ApplicationService
end
def call
load_owner
set_owner_common
end
@ -22,9 +22,15 @@ class Cache::V2::OwnerCommonService < ApplicationService
reset_owner_common
end
def clear
clear_owner_common
end
private
def load_owner
@owner = Owner.find_by(login: @login)
@owner = Owner.find_by_id @owner_id
@login = @owner&.login
@email ||= @owner&.mail
end
def owner_common_key
@ -32,35 +38,47 @@ class Cache::V2::OwnerCommonService < ApplicationService
end
def owner_common_key_by_id
"v2-owner-common:#{@owner.id}"
"v2-owner-common:#{@owner&.id}"
end
def owner_common
$redis_cache.hgetall(owner_common_key).blank? ? reset_owner_common : $redis_cache.hgetall(owner_common_key)
result = $redis_cache.hgetall(owner_common_key_by_id)
result.blank? ? reset_owner_common : result
end
def set_owner_common
if $redis_cache.hgetall(owner_common_key).blank?
if $redis_cache.hgetall(owner_common_key_by_id).blank?
reset_owner_common
return
end
if @name.present?
if $redis_cache.hget(owner_common_key, "name").nil?
reset_owner_name
else
$redis_cache.hset(owner_common_key, "name", @name)
$redis_cache.hset(owner_common_key, "avatar_url", url_to_avatar(owner))
$redis_cache.hset(owner_common_key_by_id, "name", @name)
$redis_cache.hset(owner_common_key_by_id, "avatar_url", url_to_avatar(owner))
else
load_owner
return if @owner.nil?
if @name.present?
if $redis_cache.hget(owner_common_key, "name").nil?
reset_owner_name
else
$redis_cache.hset(owner_common_key, "name", @name)
$redis_cache.hset(owner_common_key_by_id, "name", @name)
end
end
end
if @email.present?
if $redis_cache.hget(owner_common_key, "email").nil?
reset_owner_email
else
$redis_cache.hset(owner_common_key, "email", @email)
$redis_cache.hset(owner_common_key_by_id, "email", @email)
if @email.present?
if $redis_cache.hget(owner_common_key, "email").nil?
reset_owner_email
else
# 更改邮箱这里把旧数据删除
$redis_cache.del("v2-owner-common:#{@login}-*")
$redis_cache.hset(owner_common_key, "email", @email)
$redis_cache.hset(owner_common_key_by_id, "email", @email)
end
end
if @avatar_url.present?
if $redis_cache.hget(owner_common_key, "avatar_url").nil?
reset_owner_avatar_url
else
$redis_cache.hset(owner_common_key, "avatar_url", @avatar_url)
$redis_cache.hset(owner_common_key_by_id, "avatar_url", @avatar_url)
end
end
end
@ -88,20 +106,30 @@ class Cache::V2::OwnerCommonService < ApplicationService
def reset_owner_name
$redis_cache.hset(owner_common_key, "name", owner&.real_name)
$redis_cache.hset(owner_common_key, "avatar_url", url_to_avatar(owner))
$redis_cache.hset(owner_common_key_by_id, "name", owner&.real_name)
end
def reset_owner_avatar_url
$redis_cache.hset(owner_common_key, "avatar_url", url_to_avatar(owner))
$redis_cache.hset(owner_common_key_by_id, "avatar_url", url_to_avatar(owner))
end
def reset_owner_common
load_owner
$redis_cache.del(owner_common_key)
clear_owner_common
reset_owner_id
reset_owner_type
reset_owner_login
reset_owner_email
reset_owner_name
reset_owner_avatar_url
$redis_cache.hgetall(owner_common_key)
end
def clear_owner_common
load_owner
return if @owner.nil?
$redis_cache.del(owner_common_key)
$redis_cache.del(owner_common_key_by_id)
end
end

View File

@ -64,7 +64,9 @@ class Cache::V2::PlatformStatisticService < ApplicationService
end
def platform_statistic
$redis_cache.hgetall(platform_statistic_key).blank? ? reset_platform_statistic : $redis_cache.hgetall(platform_statistic_key)
result = $redis_cache.hgetall(platform_statistic_key)
result.blank? ? reset_platform_statistic : result
end
def set_platform_statistic

View File

@ -28,6 +28,10 @@ class Cache::V2::ProjectCommonService < ApplicationService
reset_project_common
end
def clear
clear_project_common
end
private
def load_project
@project = Project.find_by_id(project_id)
@ -78,109 +82,75 @@ class Cache::V2::ProjectCommonService < ApplicationService
end
def project_common
$redis_cache.hgetall(project_common_key).blank? ? reset_project_common : $redis_cache.hgetall(project_common_key)
result = $redis_cache.hgetall(project_common_key)
result.blank? ? reset_project_common : result
end
def set_project_common
if $redis_cache.hgetall(project_common_key).blank?
reset_project_common
return
end
load_project
return unless @project.is_full_public
if @owner_id.present?
if $redis_cache.hget(project_common_key, owner_id_key).nil?
reset_project_owner_id
else
$redis_cache.hset(project_common_key, owner_id_key, @owner_id)
else
load_project
return unless @project.is_full_public
if @owner_id.present?
if $redis_cache.hget(project_common_key, owner_id_key).nil?
reset_project_owner_id
else
$redis_cache.hset(project_common_key, owner_id_key, @owner_id)
end
end
end
if @name.present?
if $redis_cache.hget(project_common_key, name_key).nil?
reset_project_name
else
$redis_cache.hset(project_common_key, name_key, @name)
if @name.present?
if $redis_cache.hget(project_common_key, name_key).nil?
reset_project_name
else
$redis_cache.hset(project_common_key, name_key, @name)
end
end
end
if @identifier.present?
if $redis_cache.hget(project_common_key, identifier_key).nil?
reset_project_identifier
else
$redis_cache.hset(project_common_key, identifier_key, @identifier)
if @identifier.present?
if $redis_cache.hget(project_common_key, identifier_key).nil?
reset_project_identifier
else
$redis_cache.hset(project_common_key, identifier_key, @identifier)
end
end
end
if @description.present?
if $redis_cache.hget(project_common_key, description_key).nil?
reset_project_description
else
$redis_cache.hset(project_common_key, description_key, @description)
if @description.present?
if $redis_cache.hget(project_common_key, description_key).nil?
reset_project_description
else
$redis_cache.hset(project_common_key, description_key, @description)
end
end
end
if @visits.present?
if $redis_cache.hget(project_common_key, visits_key).nil?
reset_project_visits
Cache::V2::ProjectRankService.call(@project_id, {visits: @visits})
Cache::V2::ProjectDateRankService.call(@project_id, Date.today, {visits: @visits})
else
puts project_common_key
puts visits_key
puts @visits
if @visits.present?
$redis_cache.hincrby(project_common_key, visits_key, @visits.to_s)
Cache::V2::ProjectRankService.call(@project_id, {visits: @visits})
Cache::V2::ProjectDateRankService.call(@project_id, Date.today, {visits: @visits})
end
end
if @watchers.present?
if $redis_cache.hget(project_common_key, watchers_key).nil?
reset_project_watchers
else
if @watchers.present?
$redis_cache.hincrby(project_common_key, watchers_key, @watchers)
end
end
if @praises.present?
if $redis_cache.hget(project_common_key, praises_key).nil?
reset_project_praises
Cache::V2::ProjectRankService.call(@project_id, {praises: @praises})
Cache::V2::ProjectDateRankService.call(@project_id, Date.today, {praises: @praises})
else
if @praises.present?
$redis_cache.hincrby(project_common_key, praises_key, @praises)
Cache::V2::ProjectRankService.call(@project_id, {praises: @praises})
Cache::V2::ProjectDateRankService.call(@project_id, Date.today, {praises: @praises})
Cache::V2::ProjectRankService.call(@project_id, {praises: @praises})
Cache::V2::ProjectDateRankService.call(@project_id, Date.today, {praises: @praises})
end
end
if @forks.present?
if $redis_cache.hget(project_common_key, forks_key).nil?
reset_project_forks
Cache::V2::ProjectRankService.call(@project_id, {forks: @forks})
Cache::V2::ProjectDateRankService.call(@project_id, Date.today, {forks: @forks})
else
if @forks.present?
$redis_cache.hincrby(project_common_key, forks_key, @forks)
Cache::V2::ProjectRankService.call(@project_id, {forks: @forks})
Cache::V2::ProjectDateRankService.call(@project_id, Date.today, {forks: @forks})
end
end
if @issues.present?
if $redis_cache.hget(project_common_key, issues_key).nil?
reset_project_issues
Cache::V2::ProjectRankService.call(@project_id, {issues: @issues})
Cache::V2::ProjectDateRankService.call(@project_id, Date.today, {issues: @issues})
else
if @issues.present?
$redis_cache.hincrby(project_common_key, issues_key, @issues)
Cache::V2::ProjectRankService.call(@project_id, {issues: @issues})
Cache::V2::ProjectDateRankService.call(@project_id, Date.today, {issues: @issues})
end
end
if @pullrequests.present?
if $redis_cache.hget(project_common_key, pullrequests_key).nil?
reset_project_pullrequests
Cache::V2::ProjectRankService.call(@project_id, {pullrequests: @pullrequests})
Cache::V2::ProjectDateRankService.call(@project_id, Date.today, {pullrequests: @pullrequests})
else
if @pullrequests.present?
$redis_cache.hincrby(project_common_key, pullrequests_key, @pullrequests)
Cache::V2::ProjectRankService.call(@project_id, {pullrequests: @pullrequests})
Cache::V2::ProjectDateRankService.call(@project_id, Date.today, {pullrequests: @pullrequests})
end
end
$redis_cache.hgetall(project_common_key)
end
@ -241,4 +211,9 @@ class Cache::V2::ProjectCommonService < ApplicationService
$redis_cache.hgetall(project_common_key)
end
def clear_project_common
$redis_cache.del(project_common_key)
Cache::V2::ProjectRankService.new(@project_id).clear
end
end

View File

@ -23,6 +23,10 @@ class Cache::V2::ProjectRankService < ApplicationService
reset_project_rank
end
def clear
clear_project_rank
end
private
def load_project_common
@project_common = Cache::V2::ProjectCommonService.new(@project_id).read
@ -33,7 +37,8 @@ class Cache::V2::ProjectRankService < ApplicationService
end
def project_rank
$redis_cache.zscore(project_rank_key, @project_id).blank? ? reset_project_rank : $redis_cache.zscore(project_rank_key, @project_id)
result = $redis_cache.zscore(project_rank_key, @project_id)
result.blank? ? reset_project_rank : result
end
def set_project_rank
@ -41,23 +46,24 @@ class Cache::V2::ProjectRankService < ApplicationService
if $redis_cache.zscore(project_rank_key, @project_id).blank?
reset_project_rank
return
else
if @visits.present?
$redis_cache.zincrby(project_rank_key, @visits.to_i * 1, @project_id)
end
if @praises.present?
$redis_cache.zincrby(project_rank_key, @praises.to_i * 5, @project_id)
end
if @forks.present?
$redis_cache.zincrby(project_rank_key, @forks.to_i * 5, @project_id)
end
if @issues.present?
$redis_cache.zincrby(project_rank_key, @issues.to_i * 10, @project_id)
end
if @pullrequests.present?
$redis_cache.zincrby(project_rank_key, @pullrequests.to_i * 10, @project_id)
end
reset_user_project_rank
end
if @visits.present?
$redis_cache.zincrby(project_rank_key, @visits.to_i * 1, @project_id)
end
if @praises.present?
$redis_cache.zincrby(project_rank_key, @praises.to_i * 5, @project_id)
end
if @forks.present?
$redis_cache.zincrby(project_rank_key, @forks.to_i * 5, @project_id)
end
if @issues.present?
$redis_cache.zincrby(project_rank_key, @issues.to_i * 10, @project_id)
end
if @pullrequests.present?
$redis_cache.zincrby(project_rank_key, @pullrequests.to_i * 10, @project_id)
end
reset_user_project_rank
$redis_cache.zscore(project_rank_key, @project_id)
end
@ -74,4 +80,8 @@ class Cache::V2::ProjectRankService < ApplicationService
def reset_user_project_rank
$redis_cache.zadd("v2-user-project-rank:#{@project_common["owner_id"]}", $redis_cache.zscore(project_rank_key, @project_id), @project_id)
end
def clear_project_rank
$redis_cache.sadd('v2-project-rank-deleted', @project_id)
end
end

View File

@ -12,6 +12,7 @@ class Cache::V2::UserStatisticService < ApplicationService
@project_praise_count = params[:project_praise_count]
@project_watcher_count = params[:project_watcher_count]
@pullrequest_count = params[:pullrequest_count]
Cache::V2::OwnerCommonService.new(user_id).read
end
def read
@ -65,7 +66,8 @@ class Cache::V2::UserStatisticService < ApplicationService
end
def user_statistic
$redis_cache.hgetall(user_statistic_key).blank? ? reset_user_statistic : $redis_cache.hgetall(user_statistic_key)
result = $redis_cache.hgetall(user_statistic_key)
result.blank? ? reset_user_statistic : result
end
def set_user_statistic

View File

@ -20,7 +20,7 @@
</td>
<td><%= project_category.pinned_index == 0 ? "" : "√" %></td>
<td><%= project_category.projects_count %></td>
<td><%= project_category.projects.where(is_pinned: true).size %></td>
<td><%= project_category.projects.select(:id).where(is_pinned: true).size %></td>
<td><%= project_category.created_at&.strftime('%Y-%m-%d %H:%M') %></td>
<td class="action-container">
<%= link_to "编辑", edit_admins_project_category_path(project_category), remote: true, class: "action" %>

View File

@ -12,10 +12,10 @@ json.array! @branches do |branch|
json.timestamp render_unix_time(branch['commit']['timestamp'])
json.time_from_now time_from_now(branch['commit']['timestamp'])
json.author do
json.partial! 'repositories/commit_author', user: render_commit_author(branch['commit']['author']), name: branch['commit']['author']['name']
json.partial! 'repositories/commit_author', user: render_cache_commit_author(branch['commit']['author']), name: branch['commit']['author']['name']
end
json.committer do
json.partial! 'repositories/commit_author', user: render_commit_author(branch['commit']['committer']), name: branch['commit']['committer']['name']
json.partial! 'repositories/commit_author', user: render_cache_commit_author(branch['commit']['committer']), name: branch['commit']['committer']['name']
end
end
end

View File

@ -14,10 +14,10 @@ json.array! @branches_slice do |branch_slice|
json.timestamp render_unix_time(branch['commit']['timestamp'])
json.time_from_now time_from_now(branch['commit']['timestamp'])
json.author do
json.partial! 'repositories/commit_author', user: render_commit_author(branch['commit']['author']), name: branch['commit']['author']['name']
json.partial! 'repositories/commit_author', user: render_cache_commit_author(branch['commit']['author']), name: branch['commit']['author']['name']
end
json.committer do
json.partial! 'repositories/commit_author', user: render_commit_author(branch['commit']['committer']), name: branch['commit']['committer']['name']
json.partial! 'repositories/commit_author', user: render_cache_commit_author(branch['commit']['committer']), name: branch['commit']['committer']['name']
end
end
end

View File

@ -1,11 +1,9 @@
json.author do
author = User.find_by(mail: commit['Author']['Email'])
json.partial! 'repositories/commit_author', locals: { user: author, name: commit['Committer']['Name'] }
json.partial! 'repositories/commit_author', locals: { user: render_cache_commit_author(commit['Author']), name: commit['Author']['Name'] }
end
json.committer do
author = User.find_by(mail: commit['Committer']['Email'])
json.partial! 'repositories/commit_author', locals: { user: author, name: commit['Committer']['Name'] }
json.partial! 'repositories/commit_author', locals: { user: render_cache_commit_author(commit['Committer']), name: commit['Committer']['Name'] }
end
json.timestamp render_unix_time(commit['Committer']['When'])
json.time_from_now time_from_now(commit['Committer']['When'])

View File

@ -26,9 +26,9 @@ if @project.forge?
end
json.author do
json.partial! 'commit_author', user: render_commit_author(commit['commit']['author']), name: commit['commit']['author']['name']
json.partial! 'commit_author', user: render_cache_commit_author(commit['commit']['author']), name: commit['commit']['author']['name']
end
json.committer do
json.partial! 'commit_author', user: render_commit_author(commit['commit']['committer']), name: commit['commit']['committer']['name']
json.partial! 'commit_author', user: render_cache_commit_author(commit['commit']['committer']), name: commit['commit']['committer']['name']
end
end

View File

@ -1,9 +1,17 @@
if user
json.id user.id
json.login user.login
json.name user.real_name
json.type user&.type
json.image_url url_to_avatar(user)
if user.present?
if user.is_a?(Hash)
json.id user["id"]
json.login user["login"]
json.name user["name"]
json.type user["type"]
json.image_url user["avatar_url"]
else
json.id user.id
json.login user.login
json.name user.real_name
json.type user&.type
json.image_url url_to_avatar(user)
end
else
json.id nil
json.login name

View File

@ -0,0 +1,16 @@
user = $redis_cache.hgetall("v2-owner-common:#{contributor["login"]}-#{contributor["email"]}")
if user.blank?
json.contributions contributor["contributions"]
# json.gid contributor["id"]
json.login contributor["login"]
json.type nil
json.name contributor["login"]
json.image_url User::Avatar.get_letter_avatar_url(contributor["login"])
else
json.contributions contributor["contributions"]
# json.gid contributor["id"]
json.login user["login"]
json.type user["type"]
json.name user["name"]
json.image_url user["avatar_url"]
end

View File

@ -28,10 +28,10 @@ else
# end
# end
json.author do
json.partial! 'commit_author', user: render_commit_author(commit['commit']['author']), name: commit['commit']['author']['name']
json.partial! 'commit_author', user: render_cache_commit_author(commit['commit']['author']), name: commit['commit']['author']['name']
end
json.committer do
json.partial! 'commit_author', user: render_commit_author(commit['commit']['committer']), name: commit['commit']['committer']['name']
json.partial! 'commit_author', user: render_cache_commit_author(commit['commit']['committer']), name: commit['commit']['committer']['name']
end
end
end

View File

@ -1,16 +1,6 @@
total_count = @contributors.size
json.contributors @contributors.each do |contributor|
user = User.find_by(gitea_uid: contributor["id"])
if contributor["login"] == "root"
total_count -= 1
next
end
json.contributions contributor["contributions"]
# json.gid contributor["id"]
json.login user.login
json.type user&.type
json.name user.real_name
json.image_url url_to_avatar(user)
json.partial! 'contributor', locals: { contributor: contributor }
end
json.total_count total_count

View File

@ -56,17 +56,7 @@ json.tags_count @result[:branch_tag_total_count]['tag_count'] || 0
json.contributors do
total_count = @result[:contributor].size
json.list @result[:contributor].each do |contributor|
user = User.find_by(gitea_uid: contributor["id"])
if contributor["login"] == "root" || user.nil?
total_count -= 1
next
end
json.contributions contributor["contributions"]
json.gid contributor["id"]
json.login user.login
json.type user&.type
json.name user.real_name
json.image_url url_to_avatar(user)
json.partial! 'contributor', locals: { contributor: contributor }
end
json.total_count total_count
end

View File

@ -5,7 +5,7 @@ json.array! @tags do |tag|
json.zipball_url render_zip_url(@owner, @repository, tag['name'])
json.tarball_url render_tar_url(@owner, @repository, tag['name'])
json.tagger do
json.partial! 'commit_author', user: render_commit_author(tag['tagger']), name: tag['tagger']['name']
json.partial! 'commit_author', user: render_cache_commit_author(tag['tagger']), name: tag['tagger']['name']
end
json.time_ago time_from_now(tag['tagger']['date'].to_time)
json.created_at_unix tag['tagger']['date'].to_time.to_i
@ -16,10 +16,10 @@ json.array! @tags do |tag|
json.time_ago time_from_now(tag['commit']['commiter']['date'].to_time)
json.created_at_unix tag['commit']['commiter']['date'].to_time.to_i
json.committer do
json.partial! 'commit_author', user: render_commit_author(tag['commit']['commiter']), name: tag['commit']['commiter']['name']
json.partial! 'commit_author', user: render_cache_commit_author(tag['commit']['commiter']), name: tag['commit']['commiter']['name']
end
json.author do
json.partial! 'commit_author', user: render_commit_author(tag['commit']['author']), name: tag['commit']['author']['name']
json.partial! 'commit_author', user: render_cache_commit_author(tag['commit']['author']), name: tag['commit']['author']['name']
end
end
end

View File

@ -1,15 +1,21 @@
owner_common = $redis_cache.hgetall("v2-owner-common:#{item[0]}")
deleted_data = $redis_cache.smembers("v2-project-rank-deleted")
$redis_cache.zrem("v2-user-project-rank:#{item[0]}", delete_data) unless deleted_data.blank?
popular_project = $redis_cache.zrevrange("v2-user-project-rank:#{item[0]}", 0, 1, withscores: true)[0]
popular_project_common = $redis_cache.hgetall("v2-project-common:#{popular_project[0]}")
json.id item[0]
json.score item[1]
json.name owner_common["name"]
json.type owner_common["type"]
json.login owner_common["login"]
json.avatar_url owner_common["avatar_url"]
json.project do
json.id popular_project[0]
json.name popular_project_common["name"]
json.identifier popular_project_common["identifier"]
json.description popular_project_common["description"]
if popular_project.blank?
json.project nil
else
popular_project_common = $redis_cache.hgetall("v2-project-common:#{popular_project[0]}")
json.project do
json.id popular_project[0]
json.name popular_project_common["name"]
json.identifier popular_project_common["identifier"]
json.description popular_project_common["description"]
end
end

View File

@ -296,7 +296,7 @@
</span>
</a>
<div class="toc-wrapper">
<img src="images/logo-b38b63e6.png" class="logo" alt="" />
<img src="images/logo-cf8353ee.png" class="logo" alt="" />
<div class="lang-selector">
<a href="#" data-language-name="shell">Shell</a>
<a href="#" data-language-name="javascript">JavaScript</a>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
<a href="{baseurl}/{login1}" style="font-weight:bold;color:#3b94d6;">{nickname1}</a>在 {nickname2}/{repository} 指派给你一个易修:<a href="{baseurl}/{login2}/{identifier}/issues/{id}" style="font-weight:bold;color:#3b94d6;">{title}</a><br/>
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -44,16 +44,11 @@
{ifduedate}<a href="{baseurl}/{login1}" style="font-weight:bold;color:#3b94d6;">{nickname1}</a>将结束日期从 {duedate1} 修改为 {duedate2}{endduedate}
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
<a href="{baseurl}/{login}" style="font-weight:bold;color:#3b94d6;">{nickname}</a>已将易修 {title} 删除
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
你已加入 <a href="{baseurl}/{login}" style="font-weight:bold;color:#3b94d6;">{organization}</a> 组织<br/>
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
你已被移出 <a href="{baseurl}/{login}" style="font-weight:bold;color:#3b94d6;">{organization}</a> 组织<br/>
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
组织 <a href="{baseurl}/{login}" style="font-weight:bold;color:#3b94d6;">{organization}</a> 已把你的角色修改为 {role}
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
<a href="{baseurl}/{login1}" style="font-weight:bold;color:#3b94d6;">{nickname1}</a>在 {nickname2}/{repository} 新建了一个易修:<a href="{baseurl}/{login2}/{identifier}/issues/{id}" style="font-weight:bold;color:#3b94d6;">{title}</a><br/>
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
你已加入 <a href="{baseurl}/{login}/{identifier}" style="font-weight:bold;color:#3b94d6;">{nickname}/{repository}</a> 项目<br/>
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
你已被移出 <a href="{baseurl}/{login}/{identifier}" style="font-weight:bold;color:#3b94d6;">{nickname}/{repository}</a> 项目<br/>
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
<a href="{baseurl}/{login1}" style="font-weight:bold;color:#3b94d6;">{nickname1}</a> 已加入项目 <a href="{baseurl}/{login2}/{identifier}" style="font-weight:bold;color:#3b94d6;">{nickname2}/{repository}</a><br/>
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
<a href="{baseurl}/{login1}" style="font-weight:bold;color:#3b94d6;">{nickname1}</a> 已被移出项目 <a href="{baseurl}/{login2}/{identifier}" style="font-weight:bold;color:#3b94d6;">{nickname2}/{repository}</a><br/>
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
<a href="{baseurl}/{login1}" style="font-weight:bold;color:#3b94d6;">{nickname1}</a>在 {nickname2}/{repository} 提交了一个合并请求:<a href="{baseurl}/{login2}/{identifier}/pulls/{id}" style="font-weight:bold;color:#3b94d6;">{title}</a><br/>
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
项目 <a href="{baseurl}/{login}" style="font-weight:bold;color:#3b94d6;">{nickname}/{repository}</a> 已把你的角色修改为 {role}
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -41,16 +41,11 @@
{ifnavbar}将项目导航更改为"{navbar}"{endnavbar}
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
<a href="{baseurl}/{login1}" style="font-weight:bold;color:#3b94d6;">{nickname1}</a>在 {nickname2}/{repository} 指派给你一个合并请求:<a href="{baseurl}/{login2}/{identifier}/pulls/{id}" style="font-weight:bold;color:#3b94d6;">{title}</a><br/>
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -38,16 +38,11 @@
{ifpriority}<a href="{baseurl}/{login1}" style="font-weight:bold;color:#3b94d6;">{nickname1}</a>将优先级从 {priority1} 修改为 {priority2}{endpriority}
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
你提交的合并请求:<a href="{baseurl}/{login2}/{identifier}/pulls/{id}" style="font-weight:bold;color:#3b94d6;">{title}</a> 被拒绝;
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>

View File

@ -24,8 +24,8 @@
<div class="new_content">
<div style="width: 598px; background:#fff; margin:20px auto;">
<div style="height:50px; width: 578px; background:#3b94d6; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
<a href="https://www.trustie.net/"><img src="http://www.trustie.net/images/nav_logo.png" width="51" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实让创新更美好</p>
<a href="{baseurl}"><img src="{baseurl}/images/email_logo.png" height="45" ></a>
<p style="color:#fff; float:right; margin-top:15px;">确实开源,协同创新</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:20px; color:#333; line-height: 1.9;">
@ -34,16 +34,11 @@
你提交的合并请求:<a href="{baseurl}/{login2}/{identifier}/pulls/{id}" style="font-weight:bold;color:#3b94d6;">{title}</a> 已通过;
</p>
<div style="width: 100%; border-top: 1px solid #ddd; margin:10px 0;"></div>
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
<p style=" color:#666;">
扫一扫关注trustie微信公众号更方便获取平台动态消息推送等提醒<br/>
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
</p>
</div>
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
<p style="color:#888; float:left;">如果您在使用中有任何的疑问和建议,欢迎您给我们反馈意见<br/>
QQ群1071514693</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">Trustie团队</p>
<p style="color:#888; float:right;font-weight: bold;font-size: 16px;">GitLink团队</p>
<div style="clear:both; overflow:hidden;"></div>
</div>
</div>