mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 23:41:42 +00:00
feat: created job to make git pull #12980
This commit is contained in:
parent
504f30997e
commit
d77b8ba67b
1 changed files with 17 additions and 0 deletions
17
app/jobs/git_pull_job.rb
Normal file
17
app/jobs/git_pull_job.rb
Normal 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
|
Loading…
Reference in a new issue