{"action":"created","comment":{"url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/comments/76149950","id":76149950,"diff_hunk":"@@ -0,0 +1,208 @@\n+Promise = require 'bluebird'\n+{ docker } = require './docker-utils'\n+express = require 'express'\n+fs = Promise.promisifyAll require 'fs'\n+{ resinApi } = require './request'\n+knex = require './db'\n+_ = require 'lodash'\n+deviceRegister = require 'resin-register-device'\n+randomHexString = require './lib/random-hex-string'\n+utils = require './utils'\n+device = require './device'\n+bodyParser = require 'body-parser'\n+request = Promise.promisifyAll require 'request'\n+config = require './config'\n+PUBNUB = require 'pubnub'\n+execAsync = Promise.promisify(require('child_process').exec)\n+\n+pubnub = PUBNUB.init(config.pubnub)\n+\n+getAssetsPath = (image) ->\n+\tdocker.imageRootDir(image)\n+\t.then (rootDir) ->\n+\t\treturn rootDir + '/assets'\n+\n+exports.router = router = express.Router()\n+router.use(bodyParser())\n+\n+router.get '/v1/devices', (req, res) ->\n+\tknex('dependentDevice').select()\n+\t.then (devices) ->\n+\t\tres.json(devices)\n+\t.catch (err) ->\n+\t\tres.status(503).send(err?.message or err or 'Unknown error')\n+\n+router.post '/v1/devices', (req, res) ->\n+\tPromise.join(\n+\t\tutils.getConfig('apiKey')\n+\t\tutils.getConfig('userId')\n+\t\tdevice.getID()\n+\t\tdeviceRegister.generateUUID()\n+\t\trandomHexString.generate()\n+\t\t(apiKey, userId, deviceId, uuid, logsChannel) ->\n+\t\t\td =\n+\t\t\t\tuser: userId\n+\t\t\t\tapplication: req.body.applicationId\n+\t\t\t\tuuid: uuid\n+\t\t\t\tdevice_type: req.body.deviceType or 'edge'\n+\t\t\t\tdevice: deviceId\n+\t\t\t\tregistered_at: Math.floor(Date.now() / 1000)\n+\t\t\t\tlogs_channel: logsChannel\n+\t\t\t\tstatus: 'Provisioned'\n+\t\t\tresinApi.post\n+\t\t\t\tresource: 'device'\n+\t\t\t\tbody: d\n+\t\t\t\tcustomOptions:\n+\t\t\t\t\tapikey: apiKey\n+\t\t\t.then (dev) ->\n+\t\t\t\tdeviceForDB = {\n+\t\t\t\t\tuuid: uuid\n+\t\t\t\t\tappId: d.application\n+\t\t\t\t\tdevice_type: d.device_type\n+\t\t\t\t\tdeviceId: dev.id\n+\t\t\t\t\tname: dev.name\n+\t\t\t\t\tstatus: d.status\n+\t\t\t\t\tlogs_channel: d.logs_channel\n+\t\t\t\t}\n+\t\t\t\tknex('dependentDevice').insert(deviceForDB)\n+\t\t\t\t.then ->\n+\t\t\t\t\tres.status(202).send(dev)\n+\t)\n+\t.catch (err) ->\n+\t\tres.status(503).send(err?.message or err or 'Unknown error')\n+\n+router.get '/v1/devices/:uuid', (req, res) ->\n+\tuuid = req.params.uuid\n+\tknex('dependentDevice').select().where({ uuid })\n+\t.then ([ device ]) ->\n+\t\treturn res.status(404).send('Device not found') if !device?\n+\t\tres.json(device)\n+\t.catch (err) ->\n+\t\tres.status(503).send(err?.message or err or 'Unknown error')\n+\n+router.put '/v1/devices/:uuid/logs', (req, res) ->\n+\tuuid = req.params.uuid\n+\tm = {\n+\t\tmessage: req.body.message\n+\t\ttimestamp: req.body.timestamp or Date.now()\n+\t}\n+\tm.isSystem = req.body.isSystem if req.body.isSystem?\n+\n+\tknex('dependentDevice').select().where({ uuid })\n+\t.then ([ device ]) ->\n+\t\treturn res.status(404).send('Device not found') if !device?\n+\t\tpubnub.publish({ channel: \"device-#{device.logs_channel}-logs\", message: m })\n+\t.then ->\n+\t\tres.status(202).send('OK')\n+\t.catch (err) ->\n+\t\tres.status(503).send(err?.message or err or 'Unknown error')\n+\n+router.put '/v1/devices/:uuid', (req, res) ->\n+\tuuid = req.params.uuid\n+\tstatus = req.body.status\n+\tis_online = req.body.is_online\n+\tutils.getConfig('apiKey')\n+\t.then (apiKey) ->\n+\t\tthrow new Error('apikey not found') if !apiKey?\n+\t\tknex('dependentDevice').select().where({ uuid })\n+\t\t.then ([ device ]) ->\n+\t\t\treturn res.status(404).send('Device not found') if !device?\n+\t\t\tresinApi.patch\n+\t\t\t\tresource: 'device'\n+\t\t\t\tid: device.deviceId\n+\t\t\t\tbody: { status, is_online }\n+\t\t\t\tcustomOptions:\n+\t\t\t\t\tapikey: apiKey\n+\t\t\t.then ->\n+\t\t\t\tdevice.status = status\n+\t\t\t\tdevice.is_online = is_online\n+\t\t\t\tknex('dependentDevice').update(device).where({ uuid })\n+\t\t\t\t.then ->\n+\t\t\t\t\tres.json(device)\n+\t.catch (err) ->\n+\t\tres.status(503).send(err?.message or err or 'Unknown error')\n+\n+tarPath = (app) ->\n+\treturn '/tmp/' + app.commit + '.tar'\n+\n+router.get '/v1/assets/:commit', (req, res) ->\n+\tknex('dependentApp').select().where({ commit: req.params.commit })\n+\t.then ([ app ]) ->\n+\t\treturn res.status(404).send('Not found') if !app\n+\t\tdest = tarPath(app)\n+\t\tgetAssetsPath(app.imageId)\n+\t\t.then (path) ->\n+\t\t\tgetTarArchive(path, dest)\n+\t\t.then ->\n+\t\t\tres.sendFile(dest)\n+\t.catch (err) ->\n+\t\tconsole.error(err)\n+\t\tres.status(503).send(err?.message or err or 'Unknown error')\n+\n+getTarArchive = (path, destination) ->\n+\tfs.lstatAsync(path)\n+\t.then ->\n+\t\texecAsync(\"cd #{path} && tar -cvf #{destination} *\")\n+\n+# TODO: deduplicate code from compareForUpdate in application.coffee\n+exports.fetchAndSetTargetsForDependentApps = (state, fetchFn) ->\n+\tknex('dependentApp').select()\n+\t.then (localDependentApps) ->\n+\t\t# Compare to see which to fetch, and which to delete\n+\t\tremoteApps = _.mapValues state.apps, (app, appId) ->\n+\t\t\tenv = app.environment ? {}\n+\t\t\treturn {\n+\t\t\t\tappId: appId\n+\t\t\t\timageId: app.image\n+\t\t\t\tcommit: app.commit\n+\t\t\t\tenv: JSON.stringify(env)\n+\t\t\t}\n+\t\tlocalApps = _.indexBy(localDependentApps, 'appId')\n+\n+\t\ttoBeDownloaded = _.values(\n+\t\t\t_.filter remoteApps, (app, appId) ->\n+\t\t\t\treturn  app.commit? and !_.any(localApps, imageId: app.imageId)\n+\t\t)\n+\t\ttoBeRemoved = _.values(\n+\t\t\t_.filter localApps, (app, appId) ->\n+\t\t\t\treturn app.commit? and !_.any(remoteApps, imageId: app.imageId)\n+\t\t)\n+\t\tPromise.map toBeDownloaded, (app) ->\n+\t\t\tfetchFn(app, false)\n+\t\t.then ->\n+\t\t\tPromise.map toBeRemoved, (app) ->\n+\t\t\t\tfs.unlinkAsync(tarPath(app))\n+\t\t\t\t.then ->\n+\t\t\t\t\tdocker.getImage(app.imageId).removeAsync()\n+\t\t\t\t.catch (err) ->\n+\t\t\t\t\tconsole.error('Could not remove image/artifacts for dependent app', err, err.stack)\n+\t\t.then ->\n+\t\t\tPromise.props(\n+\t\t\t\t_.mapValues remoteApps, (app, appId) ->\n+\t\t\t\t\tknex('dependentApp').update(app).where({ appId })\n+\t\t\t\t\t.then (n) ->\n+\t\t\t\t\t\tknex('dependentApp').insert(app) if n == 0\n+\t\t\t)\n+\t\t.then ->\n+\t\t\tdevices = _.map state.devices, (device, uuid) ->","path":"src/proxyvisor.coffee","position":187,"original_position":187,"commit_id":"d5ac06f0eee0a560db596461e8e80adb816d0fdc","original_commit_id":"d5ac06f0eee0a560db596461e8e80adb816d0fdc","user":{"login":"Page-","id":360115,"avatar_url":"https://avatars.githubusercontent.com/u/360115?v=3","gravatar_id":"","url":"https://api.github.com/users/Page-","html_url":"https://github.com/Page-","followers_url":"https://api.github.com/users/Page-/followers","following_url":"https://api.github.com/users/Page-/following{/other_user}","gists_url":"https://api.github.com/users/Page-/gists{/gist_id}","starred_url":"https://api.github.com/users/Page-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Page-/subscriptions","organizations_url":"https://api.github.com/users/Page-/orgs","repos_url":"https://api.github.com/users/Page-/repos","events_url":"https://api.github.com/users/Page-/events{/privacy}","received_events_url":"https://api.github.com/users/Page-/received_events","type":"User","site_admin":false},"body":"You could change this block to:\r\n```coffee\r\nPromise.all _.map state.devices, (device, uuid) ->\r\n\tappId = _(device.apps).keys().first()\r\n\tknex('dependentDevice').update({ targetEnv: JSON.stringify(device.environment), targetCommit: state.apps[appId].commit }).where({ uuid })\r\n```","created_at":"2016-08-24T22:18:00Z","updated_at":"2016-08-24T22:18:00Z","html_url":"https://github.com/resin-io/resin-supervisor/pull/238#discussion_r76149950","pull_request_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/238","_links":{"self":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/comments/76149950"},"html":{"href":"https://github.com/resin-io/resin-supervisor/pull/238#discussion_r76149950"},"pull_request":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/238"}}},"pull_request":{"url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/238","id":82303886,"html_url":"https://github.com/resin-io/resin-supervisor/pull/238","diff_url":"https://github.com/resin-io/resin-supervisor/pull/238.diff","patch_url":"https://github.com/resin-io/resin-supervisor/pull/238.patch","issue_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/238","number":238,"state":"open","locked":false,"title":"WIP: Dependent apps and devices","user":{"login":"pcarranzav","id":2223590,"avatar_url":"https://avatars.githubusercontent.com/u/2223590?v=3","gravatar_id":"","url":"https://api.github.com/users/pcarranzav","html_url":"https://github.com/pcarranzav","followers_url":"https://api.github.com/users/pcarranzav/followers","following_url":"https://api.github.com/users/pcarranzav/following{/other_user}","gists_url":"https://api.github.com/users/pcarranzav/gists{/gist_id}","starred_url":"https://api.github.com/users/pcarranzav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcarranzav/subscriptions","organizations_url":"https://api.github.com/users/pcarranzav/orgs","repos_url":"https://api.github.com/users/pcarranzav/repos","events_url":"https://api.github.com/users/pcarranzav/events{/privacy}","received_events_url":"https://api.github.com/users/pcarranzav/received_events","type":"User","site_admin":false},"body":"+ switch to using a specific device state endpoint\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/resin-io/resin-supervisor/238)\n<!-- Reviewable:end -->\n","created_at":"2016-08-23T05:03:32Z","updated_at":"2016-08-24T22:18:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a857c56e5ed62771bacb92de4b43532442b3a20","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/238/commits","review_comments_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/238/comments","review_comment_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/238/comments","statuses_url":"https://api.github.com/repos/resin-io/resin-supervisor/statuses/d5ac06f0eee0a560db596461e8e80adb816d0fdc","head":{"label":"resin-io:235-dependent-apps","ref":"235-dependent-apps","sha":"d5ac06f0eee0a560db596461e8e80adb816d0fdc","user":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"repo":{"id":44161944,"name":"resin-supervisor","full_name":"resin-io/resin-supervisor","owner":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resin-io/resin-supervisor","description":"Resin Supervisor: resin.io's agent on devices.","fork":false,"url":"https://api.github.com/repos/resin-io/resin-supervisor","forks_url":"https://api.github.com/repos/resin-io/resin-supervisor/forks","keys_url":"https://api.github.com/repos/resin-io/resin-supervisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resin-io/resin-supervisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resin-io/resin-supervisor/teams","hooks_url":"https://api.github.com/repos/resin-io/resin-supervisor/hooks","issue_events_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/events{/number}","events_url":"https://api.github.com/repos/resin-io/resin-supervisor/events","assignees_url":"https://api.github.com/repos/resin-io/resin-supervisor/assignees{/user}","branches_url":"https://api.github.com/repos/resin-io/resin-supervisor/branches{/branch}","tags_url":"https://api.github.com/repos/resin-io/resin-supervisor/tags","blobs_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resin-io/resin-supervisor/statuses/{sha}","languages_url":"https://api.github.com/repos/resin-io/resin-supervisor/languages","stargazers_url":"https://api.github.com/repos/resin-io/resin-supervisor/stargazers","contributors_url":"https://api.github.com/repos/resin-io/resin-supervisor/contributors","subscribers_url":"https://api.github.com/repos/resin-io/resin-supervisor/subscribers","subscription_url":"https://api.github.com/repos/resin-io/resin-supervisor/subscription","commits_url":"https://api.github.com/repos/resin-io/resin-supervisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/resin-io/resin-supervisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/resin-io/resin-supervisor/contents/{+path}","compare_url":"https://api.github.com/repos/resin-io/resin-supervisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resin-io/resin-supervisor/merges","archive_url":"https://api.github.com/repos/resin-io/resin-supervisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resin-io/resin-supervisor/downloads","issues_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues{/number}","pulls_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls{/number}","milestones_url":"https://api.github.com/repos/resin-io/resin-supervisor/milestones{/number}","notifications_url":"https://api.github.com/repos/resin-io/resin-supervisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resin-io/resin-supervisor/labels{/name}","releases_url":"https://api.github.com/repos/resin-io/resin-supervisor/releases{/id}","deployments_url":"https://api.github.com/repos/resin-io/resin-supervisor/deployments","created_at":"2015-10-13T08:15:58Z","updated_at":"2016-07-27T10:26:24Z","pushed_at":"2016-08-24T18:32:07Z","git_url":"git://github.com/resin-io/resin-supervisor.git","ssh_url":"git@github.com:resin-io/resin-supervisor.git","clone_url":"https://github.com/resin-io/resin-supervisor.git","svn_url":"https://github.com/resin-io/resin-supervisor","homepage":"https://resin.io","size":1816,"stargazers_count":30,"watchers_count":30,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":68,"forks":12,"open_issues":68,"watchers":30,"default_branch":"master"}},"base":{"label":"resin-io:master","ref":"master","sha":"6de51543a530c4ba7bc5149c84275c1afeb708a2","user":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"repo":{"id":44161944,"name":"resin-supervisor","full_name":"resin-io/resin-supervisor","owner":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resin-io/resin-supervisor","description":"Resin Supervisor: resin.io's agent on devices.","fork":false,"url":"https://api.github.com/repos/resin-io/resin-supervisor","forks_url":"https://api.github.com/repos/resin-io/resin-supervisor/forks","keys_url":"https://api.github.com/repos/resin-io/resin-supervisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resin-io/resin-supervisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resin-io/resin-supervisor/teams","hooks_url":"https://api.github.com/repos/resin-io/resin-supervisor/hooks","issue_events_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/events{/number}","events_url":"https://api.github.com/repos/resin-io/resin-supervisor/events","assignees_url":"https://api.github.com/repos/resin-io/resin-supervisor/assignees{/user}","branches_url":"https://api.github.com/repos/resin-io/resin-supervisor/branches{/branch}","tags_url":"https://api.github.com/repos/resin-io/resin-supervisor/tags","blobs_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resin-io/resin-supervisor/statuses/{sha}","languages_url":"https://api.github.com/repos/resin-io/resin-supervisor/languages","stargazers_url":"https://api.github.com/repos/resin-io/resin-supervisor/stargazers","contributors_url":"https://api.github.com/repos/resin-io/resin-supervisor/contributors","subscribers_url":"https://api.github.com/repos/resin-io/resin-supervisor/subscribers","subscription_url":"https://api.github.com/repos/resin-io/resin-supervisor/subscription","commits_url":"https://api.github.com/repos/resin-io/resin-supervisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/resin-io/resin-supervisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/resin-io/resin-supervisor/contents/{+path}","compare_url":"https://api.github.com/repos/resin-io/resin-supervisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resin-io/resin-supervisor/merges","archive_url":"https://api.github.com/repos/resin-io/resin-supervisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resin-io/resin-supervisor/downloads","issues_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues{/number}","pulls_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls{/number}","milestones_url":"https://api.github.com/repos/resin-io/resin-supervisor/milestones{/number}","notifications_url":"https://api.github.com/repos/resin-io/resin-supervisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resin-io/resin-supervisor/labels{/name}","releases_url":"https://api.github.com/repos/resin-io/resin-supervisor/releases{/id}","deployments_url":"https://api.github.com/repos/resin-io/resin-supervisor/deployments","created_at":"2015-10-13T08:15:58Z","updated_at":"2016-07-27T10:26:24Z","pushed_at":"2016-08-24T18:32:07Z","git_url":"git://github.com/resin-io/resin-supervisor.git","ssh_url":"git@github.com:resin-io/resin-supervisor.git","clone_url":"https://github.com/resin-io/resin-supervisor.git","svn_url":"https://github.com/resin-io/resin-supervisor","homepage":"https://resin.io","size":1816,"stargazers_count":30,"watchers_count":30,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":68,"forks":12,"open_issues":68,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/238"},"html":{"href":"https://github.com/resin-io/resin-supervisor/pull/238"},"issue":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/issues/238"},"comments":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/issues/238/comments"},"review_comments":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/238/comments"},"review_comment":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/238/commits"},"statuses":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/statuses/d5ac06f0eee0a560db596461e8e80adb816d0fdc"}}}}
{"actor":{"display_login":"Page-"}}