do not show forked repo

This commit is contained in:
nixzhu
2015-12-14 17:30:47 +08:00
parent aaaa2cb7d7
commit 2b87ca3ee2
+6 -1
View File
@@ -136,7 +136,8 @@ func githubReposWithToken(token: String, failureHandler: ((Reason, String?) -> V
URLString = repoInfo["html_url"] as? String,
description = repoInfo["description"] as? String,
createdAtString = repoInfo["created_at"] as? String,
isPrivate = repoInfo["private"] as? Bool
isPrivate = repoInfo["private"] as? Bool,
isFork = repoInfo["fork"] as? Bool
else {
continue
}
@@ -145,6 +146,10 @@ func githubReposWithToken(token: String, failureHandler: ((Reason, String?) -> V
continue
}
guard !isFork else {
continue
}
let createdAt = NSDate.dateWithISO08601String(createdAtString)
let repo = GithubRepo(ID: ID, name: name, fullName: fullName, URLString: URLString, description: description, createdAt: createdAt)