fix: hook post-receive for sha256 repos

This commit is contained in:
oliverpool 2024-05-15 15:42:29 +02:00
parent 2ac3dcbd43
commit 5e73c67d67
8 changed files with 50 additions and 22 deletions

View file

@ -239,7 +239,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
}
// If we've pushed a branch (and not deleted it)
if !git.IsEmptyCommitID(newCommitID) && refFullName.IsBranch() {
if !git.IsEmptyCommitID(newCommitID, nil) && refFullName.IsBranch() {
// First ensure we have the repository loaded, we're allowed pulls requests and we can get the base repo
if repo == nil {
repo = loadRepository(ctx, ownerName, repoName)