You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/06/22 05:27:59 UTC

[08/40] incubator-weex git commit: * [test] add blames undefined check

* [test] add blames undefined check


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/fa91bc8a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/fa91bc8a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/fa91bc8a

Branch: refs/heads/0.15-dev
Commit: fa91bc8a15d3bc29c6863f72587bcb6cad00d971
Parents: 7f392dd
Author: yinfeng <cx...@apache.org>
Authored: Wed Jun 7 04:59:47 2017 +0800
Committer: yinfeng <cx...@apache.org>
Committed: Wed Jun 7 04:59:47 2017 +0800

----------------------------------------------------------------------
 dangerfile.js | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fa91bc8a/dangerfile.js
----------------------------------------------------------------------
diff --git a/dangerfile.js b/dangerfile.js
index 531777a..881a7f0 100644
--- a/dangerfile.js
+++ b/dangerfile.js
@@ -307,6 +307,10 @@ function findBlameReviewers(fileToDeletedLinesMap, fileToNormalLinesMap, fileToB
   Object.keys(fileToDeletedLinesMap).forEach(function (file) {
     let deletedLines = fileToDeletedLinesMap[file]
     var blames = fileToBlamesMap[file]
+    if (!blames) {
+      console.error(`failed to find blame info for (${file})`)
+      return;
+    }
     deletedLines.forEach(lineNumber => {
       var name = blames[lineNumber]
       reviewers[name] = (reviewers[name] || 0) + 3