GitHub PullRequestReviewCommentEvent at 2014-06-03 12:56:16
Repository: jobot
Actor: MacKeeper
Payload: {"comment":{"url":"https://api.github.com/repos/MacKeeper/jobot/pulls/comments/13332275","id":13332275,"diff_hunk":"@@ -69,13 +70,56 @@ class HudsonTestManagerBackendSingleton\n     loop: () =>\n       # Check for new builds\n       @checkForNewTestRun()\n-\n-    # TODO Check and notifyUnassignedTest() after env.HUDSON_TEST_MANAGER_ASSIGNMENT_TIMEOUT_IN_MINUTES minutes\n+      @checkForUnassignedTest()\n+      @checkForTestStillFail()\n+     \n+     # TODO Check and notifyUnassignedTest() after env.HUDSON_TEST_MANAGER_ASSIGNMENT_TIMEOUT_IN_MINUTES minutes\n+        \n+    sinceTest: (testlist, timeout, unit, depuis) ->\n+      unassignedlist = {}\n+      for testname, detail of testlist  \n+         #console.log 'sinceTest: ' + moment().diff(detail[depuis], unit)\n+          unassignedlist[testname]=detail if moment().diff(detail[depuis], unit) >= timeout\n+      return unassignedlist\n+\n+    checkForUnassignedTest:() ->\n+        storage = @readstorage()\n+        depuis = 'since'\n+        unit = 'minutes'\n+        timeout = process.env.HUDSON_TEST_MANAGER_ASSIGNMENT_TIMEOUT_IN_MINUTES\n+        factor  = 5\n+        offset  = factor * (Object.keys( storage.projects ).length+1) #Value for the offset, since it should be rlinked to the number of unassigned test\n+        for project,projectname of storage.projects\n+            console.log \"Looking for unassigned  tests in project #{project} since #{timeout} #{unit} (#{offset}).\"\n+            unassignedsincetest =  @sinceTest( @getFailedTests(project)[1],timeout, 'minutes',depuis )","path":"scripts/hudson-test-manager/backend.coffee","position":46,"original_position":46,"commit_id":"d0d068b6d7db94d3e06f2bd9fdd94f73e594a3a0","original_commit_id":"d0d068b6d7db94d3e06f2bd9fdd94f73e594a3a0","user":{"login":"MacKeeper","id":390071,"avatar_url":"https://avatars.githubusercontent.com/u/390071?","gravatar_id":"e7186431eac1455370f2def15b82a814","url":"https://api.github.com/users/MacKeeper","html_url":"https://github.com/MacKeeper","followers_url":"https://api.github.com/users/MacKeeper/followers","following_url":"https://api.github.com/users/MacKeeper/following{/other_user}","gists_url":"https://api.github.com/users/MacKeeper/gists{/gist_id}","starred_url":"https://api.github.com/users/MacKeeper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MacKeeper/subscriptions","organizations_url":"https://api.github.com/users/MacKeeper/orgs","repos_url":"https://api.github.com/users/MacKeeper/repos","events_url":"https://api.github.com/users/MacKeeper/events{/privacy}","received_events_url":"https://api.github.com/users/MacKeeper/received_events","type":"User","site_admin":false},"body":"sinceTest retourne même les tests assignés","created_at":"2014-06-03T12:56:16Z","updated_at":"2014-06-03T12:56:16Z","html_url":"https://github.com/MacKeeper/jobot/pull/7#discussion_r13332275","pull_request_url":"https://api.github.com/repos/MacKeeper/jobot/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/MacKeeper/jobot/pulls/comments/13332275"},"html":{"href":"https://github.com/MacKeeper/jobot/pull/7#discussion_r13332275"},"pull_request":{"href":"https://api.github.com/repos/MacKeeper/jobot/pulls/7"}}}}