|
|
|
@ -337,6 +337,14 @@ func CommitRepoAction(
|
|
|
|
|
return fmt.Errorf("GetOwner: %v", err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Change repository bare status and update last updated time.
|
|
|
|
|
if repo.IsBare { |
|
|
|
|
repo.IsBare = false |
|
|
|
|
if err = UpdateRepository(repo, false); err != nil { |
|
|
|
|
return fmt.Errorf("UpdateRepository: %v", err) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
isNewBranch := false |
|
|
|
|
opType := COMMIT_REPO |
|
|
|
|
// Check it's tag push or branch.
|
|
|
|
@ -351,12 +359,6 @@ func CommitRepoAction(
|
|
|
|
|
isNewBranch = true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Change repository bare status and update last updated time.
|
|
|
|
|
repo.IsBare = false |
|
|
|
|
if err = UpdateRepository(repo, false); err != nil { |
|
|
|
|
return fmt.Errorf("UpdateRepository: %v", err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if err = updateIssuesCommit(u, repo, repoUserName, repoName, commit.Commits); err != nil { |
|
|
|
|
log.Error(4, "updateIssuesCommit: %v", err) |
|
|
|
|
} |
|
|
|
|