{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/spotlight/issues/991","labels_url":"https://api.github.com/repos/alphagov/spotlight/issues/991/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/spotlight/issues/991/comments","events_url":"https://api.github.com/repos/alphagov/spotlight/issues/991/events","html_url":"https://github.com/alphagov/spotlight/pull/991","id":92380526,"number":991,"title":"Parse config file as Mustache","user":{"login":"alexmuller","id":121219,"avatar_url":"https://avatars.githubusercontent.com/u/121219?v=3","gravatar_id":"","url":"https://api.github.com/users/alexmuller","html_url":"https://github.com/alexmuller","followers_url":"https://api.github.com/users/alexmuller/followers","following_url":"https://api.github.com/users/alexmuller/following{/other_user}","gists_url":"https://api.github.com/users/alexmuller/gists{/gist_id}","starred_url":"https://api.github.com/users/alexmuller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexmuller/subscriptions","organizations_url":"https://api.github.com/users/alexmuller/orgs","repos_url":"https://api.github.com/users/alexmuller/repos","events_url":"https://api.github.com/users/alexmuller/events{/privacy}","received_events_url":"https://api.github.com/users/alexmuller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-01T13:12:48Z","updated_at":"2015-07-02T08:17:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/alphagov/spotlight/pulls/991","html_url":"https://github.com/alphagov/spotlight/pull/991","diff_url":"https://github.com/alphagov/spotlight/pull/991.diff","patch_url":"https://github.com/alphagov/spotlight/pull/991.patch"},"body":"This commit parses the config file as Mustache and replaces instances of `govukAppDomain` with the environment variable GOVUK_APP_DOMAIN.\n\nThis is useful for our preview and staging config files because instead of hardcoding `alphagov.co.uk` we can easily move to a new hostname.\n\nThe syntax on lines 4 and 6 is a little bit confusing. What it's doing is reassigning the Mustache tokens to be `<% %>` so that on line 5 we can include Mustache which isn't parsed (literal Mustache tags).\n\nThese tags are parsed later in the application, in `data_source.js:26`."},"comment":{"url":"https://api.github.com/repos/alphagov/spotlight/issues/comments/117954150","html_url":"https://github.com/alphagov/spotlight/pull/991#issuecomment-117954150","issue_url":"https://api.github.com/repos/alphagov/spotlight/issues/991","id":117954150,"user":{"login":"alexmuller","id":121219,"avatar_url":"https://avatars.githubusercontent.com/u/121219?v=3","gravatar_id":"","url":"https://api.github.com/users/alexmuller","html_url":"https://github.com/alexmuller","followers_url":"https://api.github.com/users/alexmuller/followers","following_url":"https://api.github.com/users/alexmuller/following{/other_user}","gists_url":"https://api.github.com/users/alexmuller/gists{/gist_id}","starred_url":"https://api.github.com/users/alexmuller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexmuller/subscriptions","organizations_url":"https://api.github.com/users/alexmuller/orgs","repos_url":"https://api.github.com/users/alexmuller/repos","events_url":"https://api.github.com/users/alexmuller/events{/privacy}","received_events_url":"https://api.github.com/users/alexmuller/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T08:17:10Z","updated_at":"2015-07-02T08:17:10Z","body":"That sounds like a plan. Could you clarify exactly how you see it working?\r\n\r\nTo be super clear, the situation we have is that there's a config setting which is `www.preview.alphagov.co.uk` (or similar) and instead we need to make it `www.#{ENV['GOVUK_APP_DOMAIN']}` instead so that when we transition to a new domain name it'll just work.\r\n\r\nI'm not sure I'll have time to make such a big change to Spotlight but let's see how it goes."}}