mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 16:51:41 +00:00
This commit is contained in:
parent
7709b9f798
commit
b06b829357
1 changed files with 3 additions and 2 deletions
|
@ -7,8 +7,9 @@ class SiteRenameOriginToUpstream < ActiveRecord::Migration[6.1]
|
|||
Site.find_each do |site|
|
||||
next unless site.repository.origin&.url == ENV['SKEL_SUTTY']
|
||||
|
||||
site.repository.rugged.remotes.rename('origin', 'upstream')
|
||||
Rails.logger.info "#{site.name}: renamed origin to upstream"
|
||||
site.repository.rugged.remotes.rename('origin', 'upstream') do |_|
|
||||
Rails.logger.info "#{site.name}: renamed origin to upstream"
|
||||
end
|
||||
rescue Rugged::Error, Rugged::OSError => e
|
||||
Rails.logger.warn "#{site.name}: #{e.message}"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue