mirror of
https://github.com/go-gitea/gitea
synced 2024-12-23 00:14:15 +01:00
Mirror bug fix on create repo action
This commit is contained in:
parent
43b33440b5
commit
8644c571db
2 changed files with 3 additions and 1 deletions
|
@ -184,7 +184,8 @@ func CommitRepoAction(userId, repoUserId int64, userName, actEmail string,
|
||||||
// NewRepoAction adds new action for creating repository.
|
// NewRepoAction adds new action for creating repository.
|
||||||
func NewRepoAction(u *User, repo *Repository) (err error) {
|
func NewRepoAction(u *User, repo *Repository) (err error) {
|
||||||
if err = NotifyWatchers(&Action{ActUserId: u.Id, ActUserName: u.Name, ActEmail: u.Email,
|
if err = NotifyWatchers(&Action{ActUserId: u.Id, ActUserName: u.Name, ActEmail: u.Email,
|
||||||
OpType: OP_CREATE_REPO, RepoId: repo.Id, RepoName: repo.Name, IsPrivate: repo.IsPrivate}); err != nil {
|
OpType: OP_CREATE_REPO, RepoId: repo.Id, RepoUserName: repo.Owner.Name, RepoName: repo.Name,
|
||||||
|
IsPrivate: repo.IsPrivate}); err != nil {
|
||||||
log.Error("action.NewRepoAction(notify watchers): %d/%s", u.Id, repo.Name)
|
log.Error("action.NewRepoAction(notify watchers): %d/%s", u.Id, repo.Name)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -475,6 +475,7 @@ func CreateRepository(u *User, name, desc, lang, license string, private, mirror
|
||||||
|
|
||||||
repo := &Repository{
|
repo := &Repository{
|
||||||
OwnerId: u.Id,
|
OwnerId: u.Id,
|
||||||
|
Owner: u,
|
||||||
Name: name,
|
Name: name,
|
||||||
LowerName: strings.ToLower(name),
|
LowerName: strings.ToLower(name),
|
||||||
Description: desc,
|
Description: desc,
|
||||||
|
|
Loading…
Reference in a new issue