From 3cf0e513e68509558e135cfaea5cdc8fecc7f7c5 Mon Sep 17 00:00:00 2001
From: Lunny Xiao <xiaolunwen@gmail.com>
Date: Fri, 17 Mar 2017 10:15:00 +0800
Subject: [PATCH] fix wrong log when push to a new branch (#1220)

---
 models/action.go         | 2 +-
 modules/github/issues.go | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 create mode 100644 modules/github/issues.go

diff --git a/models/action.go b/models/action.go
index c736fabf38..9897a879b7 100644
--- a/models/action.go
+++ b/models/action.go
@@ -360,7 +360,7 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err
 
 			issue, err := GetIssueByRef(ref)
 			if err != nil {
-				if IsErrIssueNotExist(err) {
+				if IsErrIssueNotExist(err) || err == errMissingIssueNumber {
 					continue
 				}
 				return err
diff --git a/modules/github/issues.go b/modules/github/issues.go
new file mode 100644
index 0000000000..e69de29bb2