{"action":"created","comment":{"url":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/comments/130003394","pull_request_review_id":52834136,"id":130003394,"diff_hunk":"@@ -0,0 +1,251 @@\n+'use strict';\n+\n+const Scm = require('screwdriver-scm-base');\n+const async = require('async');\n+const hoek = require('hoek');\n+\n+process.on('unhandledRejection', console.dir);\n+\n+class ScmRouter extends Scm {\n+    /**\n+     * Constructs a router for different scm strategies. At least one of Single-SCM and Multi-SCM is necessarily required.\n+     * @method constructor\n+     * @param  {Object}         config                             Object with scm[s] and ecosystem\n+     * @param  {Object}         [config.ecosystem]                 Optional object with ecosystem values\n+     * @param  {Object}         config.scm                         Single-SCM. scm to load or a single scm object\n+     * @param  {String}         config.scm.plugin                  Single-SCM. Name of the scm NPM module to load\n+     * @param  {String}         config.scm.config                  Single-SCM. Configuration to construct the module with\n+     * @param  {Array|Object}   config.scms                        Multi-SCM. Array of scms to load or a single scm object\n+     * @param  {String}         config.scms[x].plugin              Multi-SCM. Name of the scm NPM module to load\n+     * @param  {String}         config.scms[x].config              Multi-SCM. Configuration to construct the module with\n+     * @param  {String}         config.scms[x].config.displayName  Multi-SCM. Nickname to displaoy of the scm\n+     * @return {ScmRouter}\n+     */\n+    constructor(config = {}) {\n+        const ecosystem = config.ecosystem;\n+        const scmConfig = config.scm;\n+        const scmsConfig = config.scms;\n+\n+        super();\n+\n+        this.scms = {};\n+\n+        if (typeof scmConfig === 'object') {\n+            const options = hoek.applyToDefaults({ ecosystem },\n+                (scmConfig[scmConfig.plugin] || {})); // Add ecosystem to scm options\n+\n+            this.loadPlugin(scmConfig.plugin, options);\n+        }\n+\n+        if (typeof scmsConfig === 'object') {\n+            if (!(Array.isArray(scmsConfig))) {\n+                throw new Error('No scm config passed in.');\n+            }\n+            scmsConfig.forEach((scm) => {\n+                if (scm.config.displayName == null || scm.config.displayName.length === 0) {\n+                    throw new Error(`Display name not specified for ${scm.plugin} scm plugin`);\n+                }\n+                const options = hoek.applyToDefaults({ ecosystem },\n+                    (scm.config || {}));  // Add ecosystem to scm options\n+\n+                this.loadPlugin(scm.plugin, options);\n+            });\n+        }\n+\n+        if (Object.keys(this.scms).length === 0) {\n+            throw new Error('No scm config passed in.');\n+        }\n+    }\n+\n+    /**\n+     * load scm module\n+     * @method loadPlugin\n+     * @param  {String}         plugin       load plugin name\n+     * @param  {Object}         options      settings for scm module\n+     */\n+    loadPlugin(plugin, options) {\n+        // eslint-disable-next-line global-require, import/no-dynamic-require\n+        const ScmPlugin = require(`screwdriver-scm-${plugin}`);\n+        const scmPlugin = new ScmPlugin(options);\n+        const scmContexts = scmPlugin.getScmContexts();\n+        const scmContext = scmContexts[0]; // plugins return only one scmContext\n+\n+        if (scmContext == null || scmContext.length === 0) {\n+            console.warn(`Illegal scmContext for ${plugin} scm plugin`);\n+\n+            return;\n+        }\n+\n+        if (typeof this.scms[scmContext] === 'object') {\n+            console.warn(`Duplicate scm config for ${scmContext}`);\n+        }\n+\n+        this.scms[scmContext] = scmPlugin;\n+    }\n+\n+    /**\n+     * choose webhook scm module\n+     * @method chooseWebhookScm\n+     * @param  {Object}     headers          The request headers associated with the webhook payload\n+     * @param  {Object}     payload          The webhook payload received from the SCM service\n+     * @return {Promise}                     scm object\n+     */\n+    chooseWebhookScm(headers, payload) {\n+        return new Promise((resolve, reject) => {\n+            // choose a webhook scm module, or null if there is no suitable one\n+            async.detectSeries(this.scms, (scm, cb) => {\n+                scm.canHandleWebhook(headers, payload)\n+                .then((result) => {\n+                    cb(result === false ? null : scm);\n+                }).catch(() => {\n+                    cb(null);\n+                });\n+            }, (ret) => {\n+                if (ret == null) {\n+                    reject('there is no suitable webhook module');\n+                }\n+\n+                resolve(ret);\n+            });\n+        });\n+    }\n+\n+    /**\n+     * choose scm module\n+     * @method chooseScm\n+     * @param  {Object}     config              Configuration\n+     * @param  {String}     config.scmContext   Name of scm context\n+     * @return {Promise}                        scm object\n+     */\n+    chooseScm(config) {\n+        return new Promise((resolve, reject) => {\n+            if (config.scmContext == null || config.scmContext.length === 0) {\n+                reject('Not implemented');\n+            }\n+\n+            const scm = this.scms[config.scmContext];\n+\n+            if (typeof scm !== 'object') {\n+                reject('Not implemented');\n+            }\n+\n+            resolve(scm);\n+        });\n+    }\n+\n+    /**\n+     * Process by all scm module\n+     * @method allScm\n+     * @param  {Function}   callback            {Map} fn(scm)\n+     * @return {Promise}                        combined callback results\n+     */\n+    allScm(callback) {\n+        return new Promise((resolve, reject) => {\n+            async.mapSeries(Object.keys(this.scms), (key, cb) => {\n+                const scm = this.scms[key];\n+\n+                callback(scm)\n+                .then((ret) => {\n+                    cb(null, ret);\n+                }, err => cb(err));\n+            }, (err, results) => {\n+                let map = {};\n+\n+                if (err) {\n+                    reject(err);\n+                }\n+\n+                results.forEach((result) => {\n+                    map = Object.assign(map, result);\n+                });\n+\n+                resolve(map);\n+            });\n+        });\n+    }\n+\n+    _addWebhook(config) {\n+        return this.chooseScm(config).then(scm => scm.addWebhook(config));\n+    }\n+\n+    _parseUrl(config) {\n+        return this.chooseScm(config).then(scm => scm.parseUrl(config));\n+    }\n+\n+    _parseHook(headers, payload) {\n+        return this.chooseWebhookScm(headers, payload).then(scm => scm.parseHook(headers, payload));\n+    }\n+\n+    _getCheckoutCommand(config) {\n+        return this.chooseScm(config).then(scm => scm.getCheckoutCommand(config));\n+    }\n+\n+    _decorateUrl(config) {\n+        return this.chooseScm(config).then(scm => scm.decorateUrl(config));\n+    }\n+\n+    _decorateCommit(config) {\n+        return this.chooseScm(config).then(scm => scm.decorateCommit(config));\n+    }\n+\n+    _decorateAuthor(config) {\n+        return this.chooseScm(config).then(scm => scm.decorateAuthor(config));\n+    }\n+\n+    _getPermissions(config) {\n+        return this.chooseScm(config).then(scm => scm.getPermissions(config));\n+    }\n+\n+    _getCommitSha(config) {\n+        return this.chooseScm(config).then(scm => scm.getCommitSha(config));\n+    }\n+\n+    _updateCommitStatus(config) {\n+        return this.chooseScm(config).then(scm => scm.updateCommitStatus(config));\n+    }\n+\n+    _getFile(config) {\n+        return this.chooseScm(config).then(scm => scm.getFile(config));\n+    }\n+\n+    _getOpenedPRs(config) {\n+        return this.chooseScm(config).then(scm => scm.getOpenedPRs(config));\n+    }\n+\n+    _getBellConfiguration() {\n+        return this.allScm(scm => scm.getBellConfiguration());\n+    }\n+\n+    _getPrInfo(config) {\n+        return this.chooseScm(config).then(scm => scm.getPrInfo(config));\n+    }\n+\n+    stats() {\n+        let result = {};\n+\n+        Object.keys(this.scms).forEach((key) => {\n+            result = Object.assign(result, this.scms[key].stats());\n+        });\n+\n+        return result;\n+    }\n+\n+    _getScmContexts() {\n+        return Object.keys(this.scms);\n+    }\n+\n+    _canHandleWebhook(headers, payload) {\n+        return this.chooseWebhookScm(headers, payload)\n+            .then(scm => scm.canHandleWebhook(headers, payload));\n+    }\n+\n+    getDisplayName(config) {\n+        if (typeof this.scms[config.scmContext] !== 'object') {","path":"index.js","position":243,"original_position":243,"commit_id":"140f35e619188b234b8fbf1e3d960050cad89957","original_commit_id":"140f35e619188b234b8fbf1e3d960050cad89957","user":{"login":"wahapo","id":24538326,"avatar_url":"https://avatars3.githubusercontent.com/u/24538326?v=4","gravatar_id":"","url":"https://api.github.com/users/wahapo","html_url":"https://github.com/wahapo","followers_url":"https://api.github.com/users/wahapo/followers","following_url":"https://api.github.com/users/wahapo/following{/other_user}","gists_url":"https://api.github.com/users/wahapo/gists{/gist_id}","starred_url":"https://api.github.com/users/wahapo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wahapo/subscriptions","organizations_url":"https://api.github.com/users/wahapo/orgs","repos_url":"https://api.github.com/users/wahapo/repos","events_url":"https://api.github.com/users/wahapo/events{/privacy}","received_events_url":"https://api.github.com/users/wahapo/received_events","type":"User","site_admin":false},"body":"I think there is a misunderstanding. Registered all pluginss are stored in `scms`, and has selected the appropriate plugin by the `scmContext`. If the given `scmContext` is not in `scms`, then `scm[scmContext]` is \"undefined\" and can not call `getDisplayName`. Are we on the same page?","created_at":"2017-07-28T02:57:08Z","updated_at":"2017-07-28T02:57:08Z","html_url":"https://github.com/screwdriver-cd/scm-router/pull/1#discussion_r130003394","pull_request_url":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/comments/130003394"},"html":{"href":"https://github.com/screwdriver-cd/scm-router/pull/1#discussion_r130003394"},"pull_request":{"href":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/1","id":131221944,"html_url":"https://github.com/screwdriver-cd/scm-router/pull/1","diff_url":"https://github.com/screwdriver-cd/scm-router/pull/1.diff","patch_url":"https://github.com/screwdriver-cd/scm-router/pull/1.patch","issue_url":"https://api.github.com/repos/screwdriver-cd/scm-router/issues/1","number":1,"state":"open","locked":false,"title":"[DNM] feat(365) 8: scm-router first commit","user":{"login":"wahapo","id":24538326,"avatar_url":"https://avatars3.githubusercontent.com/u/24538326?v=4","gravatar_id":"","url":"https://api.github.com/users/wahapo","html_url":"https://github.com/wahapo","followers_url":"https://api.github.com/users/wahapo/followers","following_url":"https://api.github.com/users/wahapo/following{/other_user}","gists_url":"https://api.github.com/users/wahapo/gists{/gist_id}","starred_url":"https://api.github.com/users/wahapo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wahapo/subscriptions","organizations_url":"https://api.github.com/users/wahapo/orgs","repos_url":"https://api.github.com/users/wahapo/repos","events_url":"https://api.github.com/users/wahapo/events{/privacy}","received_events_url":"https://api.github.com/users/wahapo/received_events","type":"User","site_admin":false},"body":"This is scm-router (like executor-router) which deregates the scm modules and selects appropriate module in every builds.\r\nTo select a correct scm-module, scm-router call `canHandleUrl()` in each scm module. `canHandleUrl()` can determine if the scm module can handle the specified scm_url or hostname by itself.\r\n\r\nRelated: https://github.com/screwdriver-cd/screwdriver/issues/365\r\n\r\n~~Ah, I want create pipeline for screwdriver.cd. but possibly, does this have to merged to create this pipeline ...?~~\r\npipeline: https://cd.screwdriver.cd/pipelines/275\r\n\r\n## Rough specifications\r\n-  `getBellConfiguration()`\r\n Returns map context and bellConfigrations of all registered scm modules.\r\ne.g. `Promise.resolve({'github:github.com' => {}, 'bitbuket:bitbuket.org' => ... }); }`\r\n\r\n- `stats()`\r\n Returns map context and stats of all registered scm modules.\r\ne.g.\r\n ```\r\n{\r\n  github:github.com: {\r\n    requests: { total: 999, ...... },\r\n    breaker: { isClosed: true }\r\n  },\r\n  bitbucket:bitbucket.org: { ...... }\r\n}\r\n```\r\n\r\n- `getScmContexts()`\r\n Returns list of scmContext.\r\ne.g. `['github:github.com','bitbucket:bitbucket.org']`\r\n\r\n- `getDisplayName(config)`\r\nReturns a displayName.\r\ne.g. `myGithub`\r\n\r\n- `canHandleWebhook(headers, payload)`\r\n Returns a response of the module that responded as can handle at the earliest.\r\ne.g. `Promise.reject()`\r\n\r\n## Settings\r\nAvailable conventional `scm` setting and newly defined `scms[]` settings.\r\n```\r\nscm\r\n  plugin: github\r\n  github:\r\n    gheHost: github.com\r\nscms\r\n  - plugin: github\r\n    config:\r\n      displayName: myGithub\r\n      gheHost: github.screwdriver.cd\r\n```\r\nOf course, there is no problem even if setting only `scm`.\r\n```\r\nscm\r\n  plugin: github\r\n  github:\r\n    gheHost: github.com\r\n```\r\nOr you may set it all to `scms`. However, displayName will be required.\r\n```\r\nscms\r\n  - plugin: github\r\n    config:\r\n      displayName: github.com\r\n      gheHost: github.com\r\n  - plugin: github\r\n    config:\r\n      displayName: myGithub\r\n      gheHost: github.screwdriver.cd\r\n```\r\n","created_at":"2017-07-19T01:50:33Z","updated_at":"2017-07-28T02:57:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"acd94b86811db4e12a436e53a02830f2b3914926","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/1/commits","review_comments_url":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/1/comments","review_comment_url":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/comments{/number}","comments_url":"https://api.github.com/repos/screwdriver-cd/scm-router/issues/1/comments","statuses_url":"https://api.github.com/repos/screwdriver-cd/scm-router/statuses/140f35e619188b234b8fbf1e3d960050cad89957","head":{"label":"wahapo:initial","ref":"initial","sha":"140f35e619188b234b8fbf1e3d960050cad89957","user":{"login":"wahapo","id":24538326,"avatar_url":"https://avatars3.githubusercontent.com/u/24538326?v=4","gravatar_id":"","url":"https://api.github.com/users/wahapo","html_url":"https://github.com/wahapo","followers_url":"https://api.github.com/users/wahapo/followers","following_url":"https://api.github.com/users/wahapo/following{/other_user}","gists_url":"https://api.github.com/users/wahapo/gists{/gist_id}","starred_url":"https://api.github.com/users/wahapo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wahapo/subscriptions","organizations_url":"https://api.github.com/users/wahapo/orgs","repos_url":"https://api.github.com/users/wahapo/repos","events_url":"https://api.github.com/users/wahapo/events{/privacy}","received_events_url":"https://api.github.com/users/wahapo/received_events","type":"User","site_admin":false},"repo":{"id":97660500,"name":"scm-router-1","full_name":"wahapo/scm-router-1","owner":{"login":"wahapo","id":24538326,"avatar_url":"https://avatars3.githubusercontent.com/u/24538326?v=4","gravatar_id":"","url":"https://api.github.com/users/wahapo","html_url":"https://github.com/wahapo","followers_url":"https://api.github.com/users/wahapo/followers","following_url":"https://api.github.com/users/wahapo/following{/other_user}","gists_url":"https://api.github.com/users/wahapo/gists{/gist_id}","starred_url":"https://api.github.com/users/wahapo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wahapo/subscriptions","organizations_url":"https://api.github.com/users/wahapo/orgs","repos_url":"https://api.github.com/users/wahapo/repos","events_url":"https://api.github.com/users/wahapo/events{/privacy}","received_events_url":"https://api.github.com/users/wahapo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wahapo/scm-router-1","description":null,"fork":true,"url":"https://api.github.com/repos/wahapo/scm-router-1","forks_url":"https://api.github.com/repos/wahapo/scm-router-1/forks","keys_url":"https://api.github.com/repos/wahapo/scm-router-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wahapo/scm-router-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wahapo/scm-router-1/teams","hooks_url":"https://api.github.com/repos/wahapo/scm-router-1/hooks","issue_events_url":"https://api.github.com/repos/wahapo/scm-router-1/issues/events{/number}","events_url":"https://api.github.com/repos/wahapo/scm-router-1/events","assignees_url":"https://api.github.com/repos/wahapo/scm-router-1/assignees{/user}","branches_url":"https://api.github.com/repos/wahapo/scm-router-1/branches{/branch}","tags_url":"https://api.github.com/repos/wahapo/scm-router-1/tags","blobs_url":"https://api.github.com/repos/wahapo/scm-router-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wahapo/scm-router-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wahapo/scm-router-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/wahapo/scm-router-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wahapo/scm-router-1/statuses/{sha}","languages_url":"https://api.github.com/repos/wahapo/scm-router-1/languages","stargazers_url":"https://api.github.com/repos/wahapo/scm-router-1/stargazers","contributors_url":"https://api.github.com/repos/wahapo/scm-router-1/contributors","subscribers_url":"https://api.github.com/repos/wahapo/scm-router-1/subscribers","subscription_url":"https://api.github.com/repos/wahapo/scm-router-1/subscription","commits_url":"https://api.github.com/repos/wahapo/scm-router-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/wahapo/scm-router-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/wahapo/scm-router-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/wahapo/scm-router-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/wahapo/scm-router-1/contents/{+path}","compare_url":"https://api.github.com/repos/wahapo/scm-router-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wahapo/scm-router-1/merges","archive_url":"https://api.github.com/repos/wahapo/scm-router-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wahapo/scm-router-1/downloads","issues_url":"https://api.github.com/repos/wahapo/scm-router-1/issues{/number}","pulls_url":"https://api.github.com/repos/wahapo/scm-router-1/pulls{/number}","milestones_url":"https://api.github.com/repos/wahapo/scm-router-1/milestones{/number}","notifications_url":"https://api.github.com/repos/wahapo/scm-router-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wahapo/scm-router-1/labels{/name}","releases_url":"https://api.github.com/repos/wahapo/scm-router-1/releases{/id}","deployments_url":"https://api.github.com/repos/wahapo/scm-router-1/deployments","created_at":"2017-07-19T01:43:59Z","updated_at":"2017-07-11T01:08:05Z","pushed_at":"2017-07-26T06:52:43Z","git_url":"git://github.com/wahapo/scm-router-1.git","ssh_url":"git@github.com:wahapo/scm-router-1.git","clone_url":"https://github.com/wahapo/scm-router-1.git","svn_url":"https://github.com/wahapo/scm-router-1","homepage":null,"size":38,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"screwdriver-cd:master","ref":"master","sha":"456d54f42f49ae44d9b02182bfa0a78edd543f65","user":{"login":"screwdriver-cd","id":19417863,"avatar_url":"https://avatars0.githubusercontent.com/u/19417863?v=4","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"repo":{"id":96835544,"name":"scm-router","full_name":"screwdriver-cd/scm-router","owner":{"login":"screwdriver-cd","id":19417863,"avatar_url":"https://avatars0.githubusercontent.com/u/19417863?v=4","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/screwdriver-cd/scm-router","description":null,"fork":false,"url":"https://api.github.com/repos/screwdriver-cd/scm-router","forks_url":"https://api.github.com/repos/screwdriver-cd/scm-router/forks","keys_url":"https://api.github.com/repos/screwdriver-cd/scm-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/screwdriver-cd/scm-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/screwdriver-cd/scm-router/teams","hooks_url":"https://api.github.com/repos/screwdriver-cd/scm-router/hooks","issue_events_url":"https://api.github.com/repos/screwdriver-cd/scm-router/issues/events{/number}","events_url":"https://api.github.com/repos/screwdriver-cd/scm-router/events","assignees_url":"https://api.github.com/repos/screwdriver-cd/scm-router/assignees{/user}","branches_url":"https://api.github.com/repos/screwdriver-cd/scm-router/branches{/branch}","tags_url":"https://api.github.com/repos/screwdriver-cd/scm-router/tags","blobs_url":"https://api.github.com/repos/screwdriver-cd/scm-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/screwdriver-cd/scm-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/screwdriver-cd/scm-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/screwdriver-cd/scm-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/screwdriver-cd/scm-router/statuses/{sha}","languages_url":"https://api.github.com/repos/screwdriver-cd/scm-router/languages","stargazers_url":"https://api.github.com/repos/screwdriver-cd/scm-router/stargazers","contributors_url":"https://api.github.com/repos/screwdriver-cd/scm-router/contributors","subscribers_url":"https://api.github.com/repos/screwdriver-cd/scm-router/subscribers","subscription_url":"https://api.github.com/repos/screwdriver-cd/scm-router/subscription","commits_url":"https://api.github.com/repos/screwdriver-cd/scm-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/screwdriver-cd/scm-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/screwdriver-cd/scm-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/screwdriver-cd/scm-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/screwdriver-cd/scm-router/contents/{+path}","compare_url":"https://api.github.com/repos/screwdriver-cd/scm-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/screwdriver-cd/scm-router/merges","archive_url":"https://api.github.com/repos/screwdriver-cd/scm-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/screwdriver-cd/scm-router/downloads","issues_url":"https://api.github.com/repos/screwdriver-cd/scm-router/issues{/number}","pulls_url":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls{/number}","milestones_url":"https://api.github.com/repos/screwdriver-cd/scm-router/milestones{/number}","notifications_url":"https://api.github.com/repos/screwdriver-cd/scm-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/screwdriver-cd/scm-router/labels{/name}","releases_url":"https://api.github.com/repos/screwdriver-cd/scm-router/releases{/id}","deployments_url":"https://api.github.com/repos/screwdriver-cd/scm-router/deployments","created_at":"2017-07-11T01:08:05Z","updated_at":"2017-07-11T01:08:05Z","pushed_at":"2017-07-26T06:52:44Z","git_url":"git://github.com/screwdriver-cd/scm-router.git","ssh_url":"git@github.com:screwdriver-cd/scm-router.git","clone_url":"https://github.com/screwdriver-cd/scm-router.git","svn_url":"https://github.com/screwdriver-cd/scm-router","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/1"},"html":{"href":"https://github.com/screwdriver-cd/scm-router/pull/1"},"issue":{"href":"https://api.github.com/repos/screwdriver-cd/scm-router/issues/1"},"comments":{"href":"https://api.github.com/repos/screwdriver-cd/scm-router/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/screwdriver-cd/scm-router/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/screwdriver-cd/scm-router/statuses/140f35e619188b234b8fbf1e3d960050cad89957"}}}}
{"actor":{"display_login":"wahapo"}}