You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

repo_hook.go 459B

123456789101112131415
  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. // GetHook get one hook according the name on a repository
  6. func (repo *Repository) GetHook(name string) (*Hook, error) {
  7. return GetHook(repo.Path, name)
  8. }
  9. // Hooks get all the hooks on the repository
  10. func (repo *Repository) Hooks() ([]*Hook, error) {
  11. return ListHooks(repo.Path)
  12. }