{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/comments/44768487","id":44768487,"diff_hunk":"@@ -0,0 +1,89 @@\n+describe('GOVUK Modules', function() {\n+  \"use strict\";\n+  var GOVUK = window.GOVUK;\n+\n+  it('finds modules', function() {\n+    var module = $('<div data-module=\"a-module\"></div>');\n+    $('body').append(module);\n+\n+    expect(GOVUK.modules.find().length).toBe(1);\n+    expect(GOVUK.modules.find().eq(0).is('[data-module=\"a-module\"]')).toBe(true);\n+    module.remove();\n+  });\n+\n+  it('finds modules in a container', function() {\n+    var module = $('<div data-module=\"a-module\"></div>'),\n+        container = $('<div></div>').append(module);\n+\n+    expect(GOVUK.modules.find(container).length).toBe(1);\n+    expect(GOVUK.modules.find(container).eq(0).data('module')).toBe('a-module');\n+  });\n+\n+  it('finds modules that are a container', function() {\n+    var module = $('<div data-module=\"a-module\"></div>'),\n+        container = $('<div data-module=\"container-module\"></div>').append(module);\n+\n+    expect(GOVUK.modules.find(container).length).toBe(2);\n+    expect(GOVUK.modules.find(container).eq(0).data('module')).toBe('container-module');\n+    expect(GOVUK.modules.find(container).eq(1).data('module')).toBe('a-module');\n+  });\n+\n+  describe('when a module exists', function() {\n+    var callback;\n+\n+    beforeEach(function() {\n+      callback = jasmine.createSpy();\n+      GOVUK.Modules.TestAlertModule = function() {\n+        var that = this;\n+        that.start = function(element) {\n+          callback(element);\n+        }\n+      };\n+    });\n+\n+    afterEach(function() {\n+      delete GOVUK.Modules.TestAlertModule;\n+    });\n+\n+    it('starts modules within a container', function() {\n+      var module = $('<div data-module=\"test-alert-module\"></div>'),\n+          container = $('<div></div>').append(module);\n+\n+      GOVUK.modules.start(container);\n+      expect(callback).toHaveBeenCalled();\n+    });\n+\n+    it('does not start modules that are already started', function() {\n+      var module = $('<div data-module=\"test-alert-module\"></div>'),\n+          container = $('<div></div>').append(module);\n+\n+      GOVUK.modules.start(module);\n+      GOVUK.modules.start(module);\n+      expect(callback.calls.count()).toBe(1);\n+    });\n+\n+    it('passes the HTML element to the module\\'s start method', function() {\n+      var module = $('<div data-module=\"test-alert-module\"></div>'),\n+          container = $('<h1></h1>').append(module);\n+\n+      GOVUK.modules.start(container);\n+\n+      var args = callback.calls.argsFor(0);\n+      expect(args[0].is('div[data-module=\"test-alert-module\"]')).toBe(true);\n+    });\n+\n+    it('starts all modules that are on the page', function() {\n+      var modules = $(\n+            '<div data-module=\"test-alert-module\"></div>\\","path":"spec/unit/ModulesSpec.js","position":77,"original_position":77,"commit_id":"8542878a2441b95942738f2bd0e094ada2b9a37f","original_commit_id":"8542878a2441b95942738f2bd0e094ada2b9a37f","user":{"login":"fofr","id":319055,"avatar_url":"https://avatars.githubusercontent.com/u/319055?v=3","gravatar_id":"","url":"https://api.github.com/users/fofr","html_url":"https://github.com/fofr","followers_url":"https://api.github.com/users/fofr/followers","following_url":"https://api.github.com/users/fofr/following{/other_user}","gists_url":"https://api.github.com/users/fofr/gists{/gist_id}","starred_url":"https://api.github.com/users/fofr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fofr/subscriptions","organizations_url":"https://api.github.com/users/fofr/orgs","repos_url":"https://api.github.com/users/fofr/repos","events_url":"https://api.github.com/users/fofr/events{/privacy}","received_events_url":"https://api.github.com/users/fofr/received_events","type":"User","site_admin":false},"body":"I like to keep these specs backwards compatible with older browsers, so if necessary Jasmine tests can be run on older browsers to try and find problems.","created_at":"2015-11-13T10:26:18Z","updated_at":"2015-11-13T10:26:18Z","html_url":"https://github.com/alphagov/govuk_frontend_toolkit/pull/227#discussion_r44768487","pull_request_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/227","_links":{"self":{"href":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/comments/44768487"},"html":{"href":"https://github.com/alphagov/govuk_frontend_toolkit/pull/227#discussion_r44768487"},"pull_request":{"href":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/227"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/227","id":50507390,"html_url":"https://github.com/alphagov/govuk_frontend_toolkit/pull/227","diff_url":"https://github.com/alphagov/govuk_frontend_toolkit/pull/227.diff","patch_url":"https://github.com/alphagov/govuk_frontend_toolkit/pull/227.patch","issue_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/issues/227","number":227,"state":"open","locked":false,"title":"[DISCUSS] Find and auto-start JavaScript modules from markup","user":{"login":"fofr","id":319055,"avatar_url":"https://avatars.githubusercontent.com/u/319055?v=3","gravatar_id":"","url":"https://api.github.com/users/fofr","html_url":"https://github.com/fofr","followers_url":"https://api.github.com/users/fofr/followers","following_url":"https://api.github.com/users/fofr/following{/other_user}","gists_url":"https://api.github.com/users/fofr/gists{/gist_id}","starred_url":"https://api.github.com/users/fofr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fofr/subscriptions","organizations_url":"https://api.github.com/users/fofr/orgs","repos_url":"https://api.github.com/users/fofr/repos","events_url":"https://api.github.com/users/fofr/events{/privacy}","received_events_url":"https://api.github.com/users/fofr/received_events","type":"User","site_admin":false},"body":"Find and auto-start modules specified using the `data-module=\"\"` pattern in markup. Includes an example module for tracking Google Analytics events using markup, which will meet the need in this PR: https://github.com/alphagov/frontend/pull/894\r\n\r\nThis is based on the same pattern used by `govuk_admin_template` and all our publishing tools:\r\nalphagov/govuk_admin_template#3 and https://github.com/alphagov/transition/pull/192\r\n\r\nI've created an example of how this could be used on static:\r\nhttps://github.com/alphagov/static/compare/example-module-usage\r\n\r\nThis addresses the problems of:\r\n* needing to include `script` tags within views for specific JavaScript to run\r\n* determining where and when to instantiate JavaScript ie in a `base.js` file, or in a view specific one\r\n* JavaScript acting on an entire page and having side effects eg acting on all `.js-x` classes on a page, rather than within a specific part of a page\r\n\r\nThis pattern should work well with components that are used on Static.\r\n\r\ncc @robinwhittleton @quis @dsingleton @tombye @jamiecobbett \r\nAlso cc'ing @tyom, a non-GDS user of frontend toolkit.\r\n\r\n## From the documentation\r\n\r\nJavascript modules can be specified in markup using `data-` attributes:\r\n\r\n```html\r\n<div data-module=\"some-module\">\r\n  <strong>Some other markup inside the module</strong>\r\n</div>\r\n```\r\n\r\nModules can be found and started by including `govuk/modules.js` and running:\r\n\r\n```javascript\r\n$(document).ready(function(){\r\n  GOVUK.modules.start();\r\n});\r\n```\r\n\r\nThis will attempt to find and start all modules in the page. For the example above it will look for a module at `GOVUK.Modules.SomeModule`. Note the value of the data attribute has been converted to _PascalCase_.\r\n\r\nThe module will be instantiated and then its `start` method called. The HTML element with the `data-module` attribute is passed as the first argument to the module. This limits modules to acting only within their containing elements.\r\n\r\n```javascript\r\nmodule = new GOVUK.Modules[type]();\r\nmodule.start(element);\r\n```\r\n\r\nThe simplest of modules looks like this:\r\n\r\n```javascript\r\n(function(Modules) {\r\n  \"use strict\";\r\n  Modules.SomeModule = function() {\r\n    this.start = function(element) {\r\n      // module code\r\n    }\r\n  };\r\n})(window.GOVUK.Modules);\r\n```\r\n\r\n### Writing modules\r\n\r\nWhilst this isn’t prescriptive, it helps if modules look and behave in a similar manner.\r\n\r\n#### Use `js-` prefixed classes for interaction hooks\r\n\r\nMake it clear where a javascript module will be applying behaviour:\r\n\r\n```html\r\n<div data-module=\"toggle-thing\">\r\n  <a href=\"/\" class=\"js-toggle\">Toggle</a>\r\n  <div class=\"js-toggle-target\">Target</div>\r\n</div>\r\n```\r\n\r\n#### Declare event listeners at the start\r\n\r\nBeginning with a set of event listeners clearly indicates the module’s intentions.\r\n\r\n```js\r\nthis.start = function(element) {\r\n  element.on('click', '.js-toggle', toggle);\r\n  element.on('click', '.js-cancel', cancel);\r\n}\r\n```\r\n\r\nWhere possible, assign listeners to the module element to minimise the number of listeners and to allow for flexible markup:\r\n\r\n```html\r\n<div data-module=\"toggle-thing\">\r\n  <a href=\"/\" class=\"js-toggle\">This toggles</a>\r\n  <div class=\"js-toggle-target\">\r\n    <p>Some content</p>\r\n    <a href=\"/\" class=\"js-toggle\">This also toggles</a>\r\n  </div>\r\n</div>\r\n```\r\n\r\n#### Use data-attributes for configuration\r\n\r\nKeep modules flexible by moving configuration to data attributes on the module’s element:\r\n\r\n```html\r\n<div\r\n  data-module=\"html-stream\"\r\n  data-url=\"/some/endpoint\"\r\n  data-refresh-ms=\"5000\">\r\n  <!-- updates with content from end point -->\r\n</div>\r\n```\r\n\r\n#### Include Jasmine specs\r\n\r\nModules should have their own tests, whether they’re being included with the gem or are app specific.","created_at":"2015-11-12T12:56:13Z","updated_at":"2015-11-13T10:26:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6541a0e476ee9f60159e3fbc60296a12058f463d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/227/commits","review_comments_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/227/comments","review_comment_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/issues/227/comments","statuses_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/statuses/8542878a2441b95942738f2bd0e094ada2b9a37f","head":{"label":"alphagov:js-modules","ref":"js-modules","sha":"8542878a2441b95942738f2bd0e094ada2b9a37f","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":5428163,"name":"govuk_frontend_toolkit","full_name":"alphagov/govuk_frontend_toolkit","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govuk_frontend_toolkit","description":"Generic tools and helpers for building GDS front-end apps","fork":false,"url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit","forks_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/forks","keys_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/events","assignees_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/merges","archive_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/releases{/id}","created_at":"2012-08-15T16:02:20Z","updated_at":"2015-11-06T02:19:16Z","pushed_at":"2015-11-12T12:56:14Z","git_url":"git://github.com/alphagov/govuk_frontend_toolkit.git","ssh_url":"git@github.com:alphagov/govuk_frontend_toolkit.git","clone_url":"https://github.com/alphagov/govuk_frontend_toolkit.git","svn_url":"https://github.com/alphagov/govuk_frontend_toolkit","homepage":null,"size":3191,"stargazers_count":217,"watchers_count":217,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":6,"forks":56,"open_issues":6,"watchers":217,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"a3e992df90bb55f9765663a1d52fffcab8e6314b","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":5428163,"name":"govuk_frontend_toolkit","full_name":"alphagov/govuk_frontend_toolkit","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govuk_frontend_toolkit","description":"Generic tools and helpers for building GDS front-end apps","fork":false,"url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit","forks_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/forks","keys_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/events","assignees_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/merges","archive_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/releases{/id}","created_at":"2012-08-15T16:02:20Z","updated_at":"2015-11-06T02:19:16Z","pushed_at":"2015-11-12T12:56:14Z","git_url":"git://github.com/alphagov/govuk_frontend_toolkit.git","ssh_url":"git@github.com:alphagov/govuk_frontend_toolkit.git","clone_url":"https://github.com/alphagov/govuk_frontend_toolkit.git","svn_url":"https://github.com/alphagov/govuk_frontend_toolkit","homepage":null,"size":3191,"stargazers_count":217,"watchers_count":217,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":6,"forks":56,"open_issues":6,"watchers":217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/227"},"html":{"href":"https://github.com/alphagov/govuk_frontend_toolkit/pull/227"},"issue":{"href":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/issues/227"},"comments":{"href":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/issues/227/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/227/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/pulls/227/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/govuk_frontend_toolkit/statuses/8542878a2441b95942738f2bd0e094ada2b9a37f"}}}}