repo_hook.go 355 B

12345678910111213
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package git
  5. func (repo *Repository) GetHook(name string) (*Hook, error) {
  6. return GetHook(repo.Path, name)
  7. }
  8. func (repo *Repository) Hooks() ([]*Hook, error) {
  9. return ListHooks(repo.Path)
  10. }