5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 02:56:22 +00:00
panel/app/jobs/git_pull_job.rb

13 lines
378 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# Permite traer los cambios cada vez que se
# hace un push al repositorio
class GitPullJob < ApplicationJob
# @param :site [Site]
# @param :usuarie [Usuarie]
# @return [nil]
2023-07-27 19:46:32 +00:00
def perform(site, usuarie, message)
site.repository.fetch
2023-07-27 19:46:32 +00:00
site.repository.merge(usuarie, message) if site.repository.fetch&.positive?
end
end