Merge branch 'pre_trustie_server' into trustie_server
This commit is contained in:
commit
3c8ce34bc9
|
@ -4,6 +4,9 @@ namespace :commit_log_to_db do
|
|||
puts "project_id=================#{ENV['project_id']}"
|
||||
return if ENV['project_id'].blank?
|
||||
projects = Project.where(id: ENV['project_id'])
|
||||
if ENV['project_name'] == "jittor"
|
||||
projects = Project.where(id: [1403791,1404837,1404087,1403854,1403883,1403886,1403894,1404027,1404187,1404234,1404291,1404522,1404238,1404632,1404003,1403975,1404285,1404525,1404017,1403843,1403867,1403874,1403878,1403881,1403887,1403898,1403916,1403937,1403954,1403961,1403963,1403965,1403967,1403972,1403974,1403976,1403977,1403978,1404007,1404012,1404020,1404023,1404032,1404042,1404058,1404065,1404069,1404071,1404072,1404078,1404094,1404104,1404143,1404146,1404167,1404173,1404174,1404175,1404210,1404216,1404226,1404229,1404240,1404242,1404244,1404247,1404248,1404250,1404261,1404272,1404276,1404290,1404327,1404333,1404360,1404450,1404460,1404466,1404485,1404489,1404491,1404496,1404500,1404502,1404507,1404519,1404521,1404523,1404527,1404530,1404532,1404537,1404540,1404541,1404710,1404328,1404211,1404241,1404107,1403880,1404271,1404268,1404745,1404101,1404051,1404047,1404052,1406706,1403852,1403931,1404165,1404607,1404498,1404014,1404045,1404043,1403739,1403801,1403815,1403821,1403822,1403824,1403836,1403853,1403872,1403904,1403906,1403909,1403915,1403919,1403921,1403943,1403945,1403971,1403981,1404022,1404026,1404030,1404037,1404091,1404133,1404163,1404184,1404209,1404212,1404220,1404246,1404249,1404263,1404265,1404287,1404299,1404311,1404497,1404506,1404546,1404558,1404577,1404582,1404591,1404592,1404594,1404595,1404596,1404597,1404605,1404606,1404609,1404639,1404641,1404659,1404671,1404681,1404702,1404748,1404754,1404759,1404785,1404879,1404955,1405169,1405205,1405265,1405374,1407368,1407446,1407671,1407673,1404956,1404079,1404080,1403889,1404665,1404801,1404224,1404931,1404544,1403844,1404036,1404067,1404587,1404696,1404732,1404598,1405192,1404162,1403920,1403903,1405248,1403792,1403817,1403962,1403841,1404188,1404185,1405273,1404575,1404550,1404834,1405420,1404141,1405256,1404633,1405277,1404590,1404796,1405230,1405189,1404584,1405257,1405198,1403925,1404692,1405253,1403809,1405118,1404756,1404962,1404864,1405190,1405258,1405274,1404642,1404924,1404453,1404926,1404649,1404237,1404233,1404600,1404758,1405259,1404157,1404444,1404451,1404920,1404919,1404927,1403830,1404658,1405145,1405185,1403842,1403807,1403895,1404549,1404593,1404750,1404798,1404551,1404701,1405156,1404579,1404655,1405267,1404957,1404556,1404651,1404456,1405430,1403955,1404063,1404214,1403942,1404040,1404804,1428732,1403939,1404208,1404245,1405278,1404139,1403850,1404192,1404293,1404297,1404370,1404492,1404693,1404757,1404329,1404512,1404228,1404314,1404016,1404652,1405275,1404832,1404561,1404653,1404704,1404892,1404589,1404953,1405269,1404881,1404221,1404230,1404793,1403953,1404933,1404035,1404599,1403924,1404119,1404526,1404581,1404705,1404709,1404073,1403808,1403892,1404574,1403849,1404251,1404792,1403865,1404640,1404783,1404048,1406707,1404708,1404053,1404295,1404050,1404049,1404044,1404274,1404046,1404636])
|
||||
end
|
||||
projects.each_with_index do |project, index|
|
||||
result = Gitea::Repository::Commits::ListService.call(project.owner.login,project.identifier,sha: "", page: 1, limit: 200, token: project.owner.gitea_token)
|
||||
next if result.blank? || result[:total_count].blank?
|
||||
|
@ -24,6 +27,7 @@ namespace :commit_log_to_db do
|
|||
# "luoyuan <luoyuan7@huawei.com>"
|
||||
commit_author = "#{commiter['name']} <#{commiter['email']}>"
|
||||
commit_sha = commit['sha']
|
||||
next if CommitLog.find_by(commit_id: commit_sha).present?
|
||||
ref = "master"
|
||||
commit_message = commit['commit']['message'].to_s.gsub("\"","")
|
||||
user = User.find_by(mail: commiter['email'])
|
||||
|
@ -59,6 +63,7 @@ namespace :commit_log_to_db do
|
|||
# "luoyuan <luoyuan7@huawei.com>"
|
||||
commit_author = "#{commiter['name']} <#{commiter['email']}>"
|
||||
commit_sha = commit['sha']
|
||||
next if CommitLog.find_by(commit_id: commit_sha).present?
|
||||
ref = "master"
|
||||
commit_message = commit['commit']['message'].to_s.gsub("/n","").gsub("\"","")
|
||||
user = User.find_by(mail: commiter['email'])
|
||||
|
|
Loading…
Reference in New Issue