{"action":"closed","number":650,"pull_request":{"url":"https://api.github.com/repos/alphagov/static/pulls/650","id":45161368,"html_url":"https://github.com/alphagov/static/pull/650","diff_url":"https://github.com/alphagov/static/pull/650.diff","patch_url":"https://github.com/alphagov/static/pull/650.patch","issue_url":"https://api.github.com/repos/alphagov/static/issues/650","number":650,"state":"closed","locked":false,"title":"Notification banner refactorings and test clean-up","user":{"login":"benilovj","id":23801,"avatar_url":"https://avatars.githubusercontent.com/u/23801?v=3","gravatar_id":"","url":"https://api.github.com/users/benilovj","html_url":"https://github.com/benilovj","followers_url":"https://api.github.com/users/benilovj/followers","following_url":"https://api.github.com/users/benilovj/following{/other_user}","gists_url":"https://api.github.com/users/benilovj/gists{/gist_id}","starred_url":"https://api.github.com/users/benilovj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benilovj/subscriptions","organizations_url":"https://api.github.com/users/benilovj/orgs","repos_url":"https://api.github.com/users/benilovj/repos","events_url":"https://api.github.com/users/benilovj/events{/privacy}","received_events_url":"https://api.github.com/users/benilovj/received_events","type":"User","site_admin":false},"body":"The original intention of this refactoring was to remove stubbing from the banner integration tests (which has [caused intermittent test failures on CI](https://ci-new.alphagov.co.uk/job/govuk_static_branches/602/console)), but it pays down some tech debt on the way.\r\n\r\nThe highlights:\r\n\r\n- simplification of the `NotificationFileLookup` class\r\n- `NotificationFileLookup` is no longer a singleton (instead, a module attribute `Static.banner` is introduced to store the global state)\r\n- `NotificationFileLookup` can be optionally passed a path where the banner templates can be found\r\n- fix some nesting and duplication issues in `NotificationsTest`\r\n- `NotificationsTest` no longer uses stubbing, creating and deleting real test template files instead\r\n\r\n/cc @binaryberry @jamiecobbett @boffbowsh ","created_at":"2015-09-16T11:47:21Z","updated_at":"2015-09-16T12:04:06Z","closed_at":"2015-09-16T12:04:06Z","merged_at":"2015-09-16T12:04:06Z","merge_commit_sha":"aae2fbc11a666aa2ba3c394adf382a7b244a71b8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/static/pulls/650/commits","review_comments_url":"https://api.github.com/repos/alphagov/static/pulls/650/comments","review_comment_url":"https://api.github.com/repos/alphagov/static/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/static/issues/650/comments","statuses_url":"https://api.github.com/repos/alphagov/static/statuses/f1338fdc8f325ba3d5236acaacd73bab7045bebb","head":{"label":"alphagov:notification-banner-refactorings","ref":"notification-banner-refactorings","sha":"f1338fdc8f325ba3d5236acaacd73bab7045bebb","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":1599151,"name":"static","full_name":"alphagov/static","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/static","description":"GOV.UK static files/resources","fork":false,"url":"https://api.github.com/repos/alphagov/static","forks_url":"https://api.github.com/repos/alphagov/static/forks","keys_url":"https://api.github.com/repos/alphagov/static/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/static/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/static/teams","hooks_url":"https://api.github.com/repos/alphagov/static/hooks","issue_events_url":"https://api.github.com/repos/alphagov/static/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/static/events","assignees_url":"https://api.github.com/repos/alphagov/static/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/static/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/static/tags","blobs_url":"https://api.github.com/repos/alphagov/static/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/static/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/static/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/static/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/static/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/static/languages","stargazers_url":"https://api.github.com/repos/alphagov/static/stargazers","contributors_url":"https://api.github.com/repos/alphagov/static/contributors","subscribers_url":"https://api.github.com/repos/alphagov/static/subscribers","subscription_url":"https://api.github.com/repos/alphagov/static/subscription","commits_url":"https://api.github.com/repos/alphagov/static/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/static/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/static/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/static/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/static/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/static/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/static/merges","archive_url":"https://api.github.com/repos/alphagov/static/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/static/downloads","issues_url":"https://api.github.com/repos/alphagov/static/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/static/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/static/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/static/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/static/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/static/releases{/id}","created_at":"2011-04-11T13:42:56Z","updated_at":"2015-08-12T15:17:43Z","pushed_at":"2015-09-16T12:04:06Z","git_url":"git://github.com/alphagov/static.git","ssh_url":"git@github.com:alphagov/static.git","clone_url":"https://github.com/alphagov/static.git","svn_url":"https://github.com/alphagov/static","homepage":"","size":28463,"stargazers_count":74,"watchers_count":74,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":3,"forks":31,"open_issues":3,"watchers":74,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"457cb7d1255ad3842694bc88cbde234660bef3de","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":1599151,"name":"static","full_name":"alphagov/static","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/static","description":"GOV.UK static files/resources","fork":false,"url":"https://api.github.com/repos/alphagov/static","forks_url":"https://api.github.com/repos/alphagov/static/forks","keys_url":"https://api.github.com/repos/alphagov/static/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/static/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/static/teams","hooks_url":"https://api.github.com/repos/alphagov/static/hooks","issue_events_url":"https://api.github.com/repos/alphagov/static/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/static/events","assignees_url":"https://api.github.com/repos/alphagov/static/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/static/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/static/tags","blobs_url":"https://api.github.com/repos/alphagov/static/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/static/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/static/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/static/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/static/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/static/languages","stargazers_url":"https://api.github.com/repos/alphagov/static/stargazers","contributors_url":"https://api.github.com/repos/alphagov/static/contributors","subscribers_url":"https://api.github.com/repos/alphagov/static/subscribers","subscription_url":"https://api.github.com/repos/alphagov/static/subscription","commits_url":"https://api.github.com/repos/alphagov/static/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/static/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/static/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/static/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/static/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/static/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/static/merges","archive_url":"https://api.github.com/repos/alphagov/static/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/static/downloads","issues_url":"https://api.github.com/repos/alphagov/static/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/static/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/static/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/static/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/static/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/static/releases{/id}","created_at":"2011-04-11T13:42:56Z","updated_at":"2015-08-12T15:17:43Z","pushed_at":"2015-09-16T12:04:06Z","git_url":"git://github.com/alphagov/static.git","ssh_url":"git@github.com:alphagov/static.git","clone_url":"https://github.com/alphagov/static.git","svn_url":"https://github.com/alphagov/static","homepage":"","size":28463,"stargazers_count":74,"watchers_count":74,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":3,"forks":31,"open_issues":3,"watchers":74,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/static/pulls/650"},"html":{"href":"https://github.com/alphagov/static/pull/650"},"issue":{"href":"https://api.github.com/repos/alphagov/static/issues/650"},"comments":{"href":"https://api.github.com/repos/alphagov/static/issues/650/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/static/pulls/650/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/static/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/static/pulls/650/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/static/statuses/f1338fdc8f325ba3d5236acaacd73bab7045bebb"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"boffbowsh","id":18276,"avatar_url":"https://avatars.githubusercontent.com/u/18276?v=3","gravatar_id":"","url":"https://api.github.com/users/boffbowsh","html_url":"https://github.com/boffbowsh","followers_url":"https://api.github.com/users/boffbowsh/followers","following_url":"https://api.github.com/users/boffbowsh/following{/other_user}","gists_url":"https://api.github.com/users/boffbowsh/gists{/gist_id}","starred_url":"https://api.github.com/users/boffbowsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boffbowsh/subscriptions","organizations_url":"https://api.github.com/users/boffbowsh/orgs","repos_url":"https://api.github.com/users/boffbowsh/repos","events_url":"https://api.github.com/users/boffbowsh/events{/privacy}","received_events_url":"https://api.github.com/users/boffbowsh/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":6,"additions":123,"deletions":93,"changed_files":8}}