Browse Source

fix showing pull request link when delete a branch (#5166)

tags/v1.7.0-dev
Lunny Xiao 5 years ago
parent
commit
a2ee2a3c67
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      cmd/hook.go

+ 1
- 1
cmd/hook.go View File

@@ -214,7 +214,7 @@ func runHookPostReceive(c *cli.Context) error {
log.GitLogger.Error(2, "Update: %v", err)
}

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

Loading…
Cancel
Save