5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 04:51:42 +00:00

feat: created job to make git pull #12980

This commit is contained in:
jazzari 2023-07-20 14:58:21 -03:00
parent 504f30997e
commit d77b8ba67b

17
app/jobs/git_pull_job.rb Normal file
View file

@ -0,0 +1,17 @@
# frozen_string_literal: true
# Permite traer los cambios cada vez que se
# hace un push al repositorio
class GitPullJob < ApplicationJob
# @param :site [Site]
# @return [nil]
def perform(site)
# hace un fetch para ver cambios
site.repository.fetch
# hace un merge
site.repository.merge(site.usuarie)
site.repository.git_sh("git lfs fetch")
end
end