Since gitlab-shell no sense to check hooks
This commit is contained in:
parent
a404c43805
commit
fcfb6d8438
2 changed files with 0 additions and 43 deletions
|
@ -60,25 +60,6 @@ class Repository
|
|||
Commit.commits_between(repo, from, to)
|
||||
end
|
||||
|
||||
def has_post_receive_file?
|
||||
!!hook_file
|
||||
end
|
||||
|
||||
def valid_post_receive_file?
|
||||
valid_hook_file == hook_file
|
||||
end
|
||||
|
||||
def valid_hook_file
|
||||
@valid_hook_file ||= File.read(Rails.root.join('lib', 'hooks', 'post-receive'))
|
||||
end
|
||||
|
||||
def hook_file
|
||||
@hook_file ||= begin
|
||||
hook_path = File.join(path_to_repo, 'hooks', 'post-receive')
|
||||
File.read(hook_path) if File.exists?(hook_path)
|
||||
end
|
||||
end
|
||||
|
||||
# Returns an Array of branch names
|
||||
def branch_names
|
||||
repo.branches.collect(&:name).sort
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue