diff options
author | Unknwon <u@gogs.io> | 2015-09-25 21:06:31 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-25 21:06:31 -0400 |
commit | 2dde2a8ad3bbec26172e48697f29242c12712057 (patch) | |
tree | 06e8dd4e5cc6c118e32c5bc0b6cda2953ad0879c /models/action.go | |
parent | 6dfee30bf0a6faef3211eb9fd1587c4fd8e87eef (diff) | |
download | gitea-2dde2a8ad3bbec26172e48697f29242c12712057.tar.gz gitea-2dde2a8ad3bbec26172e48697f29242c12712057.zip |
fix error detect when push commits
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/models/action.go b/models/action.go index 07e4da8f95..e38cf593b8 100644 --- a/models/action.go +++ b/models/action.go @@ -192,7 +192,6 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string // Commits are appended in the reverse order. for i := len(commits) - 1; i >= 0; i-- { c := commits[i] - fmt.Println(c) refMarked := make(map[int64]bool) for _, ref := range IssueReferenceKeywordsPat.FindAllString(c.Message, -1) { @@ -214,6 +213,9 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string issue, err := GetIssueByRef(ref) if err != nil { + if IsErrIssueNotExist(err) { + continue + } return err } @@ -250,6 +252,9 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string issue, err := GetIssueByRef(ref) if err != nil { + if IsErrIssueNotExist(err) { + continue + } return err } @@ -287,6 +292,9 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string issue, err := GetIssueByRef(ref) if err != nil { + if IsErrIssueNotExist(err) { + continue + } return err } @@ -350,7 +358,7 @@ func CommitRepoAction( } if err = updateIssuesCommit(u, repo, repoUserName, repoName, commit.Commits); err != nil { - log.Debug("updateIssuesCommit: %v", err) + log.Error(4, "updateIssuesCommit: %v", err) } } |