MCPcopy Create free account
hub / github.com/gogs/gogs / createDelegateHooks

Function createDelegateHooks

internal/database/repo.go:907–917  ·  view source on GitHub ↗
(repoPath string)

Source from the content-addressed store, hash-verified

905}
906
907func createDelegateHooks(repoPath string) (err error) {
908 for _, name := range git.ServerSideHooks {
909 hookPath := filepath.Join(repoPath, "hooks", string(name))
910 if err = os.WriteFile(hookPath,
911 []byte(fmt.Sprintf(hooksTpls[name], conf.Repository.ScriptType, conf.AppPath(), conf.CustomConf)),
912 os.ModePerm); err != nil {
913 return errors.Newf("create delegate hook '%s': %v", hookPath, err)
914 }
915 }
916 return nil
917}
918
919// Finish migrating repository and/or wiki with things that don't need to be done for mirrors.
920func CleanUpMigrateInfo(repo *Repository) (*Repository, error) {

Callers 5

InitWikiMethod · 0.85
CleanUpMigrateInfoFunction · 0.85
initRepositoryFunction · 0.85
SyncRepositoryHooksFunction · 0.85
ForkRepositoryFunction · 0.85

Calls 2

AppPathFunction · 0.92
stringFunction · 0.85

Tested by

no test coverage detected