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 387B

1234567891011121314
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package git
  4. // GetHook get one hook according the name on a repository
  5. func (repo *Repository) GetHook(name string) (*Hook, error) {
  6. return GetHook(repo.Path, name)
  7. }
  8. // Hooks get all the hooks on the repository
  9. func (repo *Repository) Hooks() ([]*Hook, error) {
  10. return ListHooks(repo.Path)
  11. }