mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 15:21:41 +00:00
fix: solo hacer merge si hubo cambios para traer
This commit is contained in:
parent
ab5ed0dec9
commit
85e528e660
1 changed files with 9 additions and 8 deletions
|
@ -3,11 +3,12 @@
|
|||
# Permite traer los cambios cada vez que se
|
||||
# hace un push al repositorio
|
||||
class GitPullJob < ApplicationJob
|
||||
# @param :site [Site]
|
||||
# @param :usuarie [Usuarie]
|
||||
# @return [nil]
|
||||
def perform(site, usuarie)
|
||||
site.repository.fetch
|
||||
site.repository.merge(usuarie)
|
||||
end
|
||||
end
|
||||
# @param :site [Site]
|
||||
# @param :usuarie [Usuarie]
|
||||
# @return [nil]
|
||||
def perform(site, usuarie)
|
||||
return unless site.repository.fetch.positive?
|
||||
|
||||
site.repository.merge(usuarie)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue