5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 23:26:23 +00:00
panel/app/jobs/git_pull_job.rb
f b96363a59f
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Merge branch 'rails' of 0xacab.org:sutty/sutty into issue-12980
2023-10-31 14:05:50 -03:00

16 lines
373 B
Ruby

# frozen_string_literal: true
# Permite traer los cambios desde webhooks
class GitPullJob < ApplicationJob
# @param :site [Site]
# @param :usuarie [Usuarie]
# @return [nil]
def perform(site, usuarie)
return unless site.repository.origin
return unless site.repository.fetch.positive?
site.repository.merge(usuarie)
site.reindex_changes!
end
end