mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 19:16:22 +00:00
fix: movido git lfs a método merge en repository.rb #13903
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
9f94ee3bc7
commit
06ebb63d93
2 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Permite traer los cambios cada vez que se
|
||||
# hace un push al repositorio
|
||||
# Permite traer los cambios desde webhooks
|
||||
|
||||
class GitPullJob < ApplicationJob
|
||||
# @param :site [Site]
|
||||
# @param :usuarie [Usuarie]
|
||||
|
|
|
@ -45,9 +45,7 @@ class Site
|
|||
# @return [Integer]
|
||||
def fetch
|
||||
if origin.check_connection(:fetch, credentials: credentials)
|
||||
rugged.fetch(origin, credentials: credentials)[:received_objects].tap do |objects|
|
||||
git_sh("git", "lfs", "fetch", "origin", default_branch) if objects&.positive?
|
||||
end
|
||||
rugged.fetch(origin, credentials: credentials)[:received_objects]
|
||||
else
|
||||
0
|
||||
end
|
||||
|
@ -77,6 +75,8 @@ class Site
|
|||
# Forzamos el checkout para mover el HEAD al último commit y
|
||||
# escribir los cambios
|
||||
rugged.checkout 'HEAD', strategy: :force
|
||||
|
||||
git_sh("git", "lfs", "fetch", "origin", default_branch)
|
||||
# reemplaza los pointers por los archivos correspondientes
|
||||
git_sh("git", "lfs", "checkout")
|
||||
commit
|
||||
|
|
Loading…
Reference in a new issue