(repoPath string)
| 905 | } |
| 906 | |
| 907 | func 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. |
| 920 | func CleanUpMigrateInfo(repo *Repository) (*Repository, error) { |
no test coverage detected