Skip to content

Commit a2ee2a3

Browse files
lunnytechknowlogick
authored andcommitted
fix showing pull request link when delete a branch (#5166)
1 parent fb14458 commit a2ee2a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/hook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func runHookPostReceive(c *cli.Context) error {
214214
log.GitLogger.Error(2, "Update: %v", err)
215215
}
216216

217-
if strings.HasPrefix(refFullName, git.BranchPrefix) {
217+
if newCommitID != git.EmptySHA && strings.HasPrefix(refFullName, git.BranchPrefix) {
218218
branch := strings.TrimPrefix(refFullName, git.BranchPrefix)
219219
repo, pullRequestAllowed, err := private.GetRepository(repoID)
220220
if err != nil {

0 commit comments

Comments
 (0)