{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/paas-billing/pulls/comments/174131255","pull_request_review_id":103430418,"id":174131255,"diff_hunk":"@@ -0,0 +1,341 @@\n+package api_test\n+\n+import (\n+\t\"encoding/json\"\n+\t\"fmt\"\n+\t\"io/ioutil\"\n+\t\"net/http\"\n+\t\"net/http/httptest\"\n+\t\"net/url\"\n+\t\"strconv\"\n+\t\"time\"\n+\n+\t\"github.com/alphagov/paas-billing/db\"\n+\t\"github.com/alphagov/paas-billing/db/dbhelper\"\n+\t\"github.com/alphagov/paas-billing/fixtures\"\n+\t\"github.com/alphagov/paas-billing/server\"\n+\t\"github.com/labstack/echo\"\n+\n+\t. \"github.com/onsi/ginkgo\"\n+\t. \"github.com/onsi/gomega\"\n+)\n+\n+var _ = Describe(\"Currency Conversion\", func() {\n+\tvar (\n+\t\tconnstr       string\n+\t\tsqlClient     *db.PostgresClient\n+\t\tauthenticator = AuthenticatedNonAdmin\n+\t\tstart         = time.Date(2018, 3, 1, 0, 0, 0, 0, time.UTC)\n+\t)\n+\n+\tExpectJSON := func(actual interface{}, expected interface{}) {\n+\t\tb1, err := json.Marshal(actual)\n+\t\tExpect(err).ToNot(HaveOccurred(), \"ExpectJSON failed for expected value\")\n+\t\tb2, err := json.Marshal(expected)\n+\t\tExpect(err).ToNot(HaveOccurred(), \"ExpectJSON failed for actual value\")\n+\t\tExpect(string(b1)).To(MatchJSON(string(b2)))\n+\t}\n+\n+\tdoRequest := func(path string, v interface{}, params map[string]string) {\n+\t\tu, err := url.Parse(path)\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\n+\t\tq := u.Query()\n+\t\tfor k, v := range params {\n+\t\t\tq.Set(k, v)\n+\t\t}\n+\t\tu.RawQuery = q.Encode()\n+\t\treq, err := http.NewRequest(\"GET\", u.String(), nil)\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\t\treq.Header.Set(echo.HeaderAccept, echo.MIMEApplicationJSONCharsetUTF8)\n+\t\treq.Header.Set(echo.HeaderAuthorization, FakeBearerToken)\n+\n+\t\te := server.New(sqlClient, authenticator, nil)\n+\t\trec := httptest.NewRecorder()\n+\t\te.ServeHTTP(rec, req)\n+\n+\t\tres := rec.Result()\n+\t\tbody, _ := ioutil.ReadAll(res.Body)\n+\t\tExpect(res.StatusCode).To(Equal(http.StatusOK), string(body))\n+\n+\t\terr = json.Unmarshal(body, v)\n+\t\tExpect(err).ToNot(HaveOccurred(), fmt.Sprintf(\"failed to unmarshal json: %s\\nbody: %s\", err, string(body)))\n+\t}\n+\n+\taddCurrency := func(code string, rate float64, validFrom time.Time) {\n+\t\tcurrencyRateFixtures := fixtures.CurrencyRates{{\n+\t\t\tCode:      code,\n+\t\t\tRate:      rate,\n+\t\t\tValidFrom: validFrom,\n+\t\t}}\n+\t\terr := currencyRateFixtures.Insert(sqlClient)\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\t}\n+\n+\trequest := func(path string, from time.Time, to time.Time, v interface{}) {\n+\t\tdoRequest(path, v, map[string]string{\n+\t\t\t\"from\": from.Format(time.RFC3339Nano),\n+\t\t\t\"to\":   to.Format(time.RFC3339Nano),\n+\t\t})\n+\t}\n+\n+\temptyOrgsFixture := func(guid string, spaceGUID string) fixtures.Orgs {\n+\t\tgbpOrgsFixtures := fixtures.Orgs{}\n+\t\tgbpOrgsFixtures[guid] = fixtures.Org{}\n+\t\tgbpOrgsFixtures[guid][spaceGUID] = fixtures.Space{}\n+\t\treturn gbpOrgsFixtures\n+\t}\n+\n+\taddEvent := func(fixture fixtures.Space, eventTime time.Time) fixtures.Space {\n+\t\tnewAppEvents := append(fixture.AppEvents, fixtures.AppEvent{\n+\t\t\tAppGuid:               \"00000001-0002-0001-0000-000000000000\",\n+\t\t\tState:                 \"STARTED\",\n+\t\t\tInstanceCount:         1,\n+\t\t\tMemoryInMBPerInstance: 100,\n+\t\t\tTime: eventTime,\n+\t\t})\n+\t\tnewServiceEvents := append(fixture.ServiceEvents, fixtures.ServiceEvent{\n+\t\t\tServiceInstanceGuid: \"00000001-0002-0002-0000-000000000000\",\n+\t\t\tState:               \"SPAM\",\n+\t\t\tServicePlanGuid:     \"00000000-0000-0000-0000-100000000000\",\n+\t\t\tTime:                eventTime,\n+\t\t})\n+\t\tfixture.AppEvents = newAppEvents\n+\t\tfixture.ServiceEvents = newServiceEvents\n+\t\treturn fixture\n+\t}\n+\n+\tcreateComputePlan := func(validFrom time.Time, componentFormulas [][]string) fixtures.Plans {\n+\t\tcomponents := []fixtures.PricingPlanComponent{}\n+\t\tfor i, v := range componentFormulas {\n+\t\t\tcurrency := v[0]\n+\t\t\tformula := v[1]\n+\t\t\tcomponents = append(components,\n+\t\t\t\tfixtures.PricingPlanComponent{\n+\t\t\t\t\tID:        101 + i,\n+\t\t\t\t\tName:      \"ComputePlanA/\" + strconv.Itoa(i),\n+\t\t\t\t\tFormula:   formula,\n+\t\t\t\t\tVATRateID: 1,\n+\t\t\t\t\tCurrency:  currency,\n+\t\t\t\t},\n+\t\t\t)\n+\t\t}\n+\n+\t\treturn fixtures.Plans{\n+\t\t\t{\n+\t\t\t\tID:         10,\n+\t\t\t\tName:       \"ComputePlanA\",\n+\t\t\t\tPlanGuid:   db.ComputePlanGuid,\n+\t\t\t\tValidFrom:  validFrom,\n+\t\t\t\tComponents: components,\n+\t\t\t},\n+\t\t}\n+\t}\n+\n+\tcreateScenario := func(\n+\t\tguid string,\n+\t\tspaceGUID string,\n+\t\tstartTime time.Time,\n+\t\tcomponentFormulas [][]string,\n+\t) {\n+\t\tgbpOrgsFixtures := emptyOrgsFixture(guid, spaceGUID)\n+\t\tgbpOrgsFixtures[guid][spaceGUID] = addEvent(gbpOrgsFixtures[guid][spaceGUID], startTime)\n+\n+\t\tgbpPlans := createComputePlan(start, componentFormulas)\n+\n+\t\terr := gbpOrgsFixtures.Insert(sqlClient, now)\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\n+\t\terr = gbpPlans.Insert(sqlClient)\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\n+\t\terr = sqlClient.UpdateViews()\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\t}\n+\n+\tBeforeEach(func() {\n+\t\tvar err error\n+\t\tconnstr, err = dbhelper.CreateDB()\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\t\tsqlClient, err = db.NewPostgresClient(connstr)\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\t\terr = sqlClient.InitSchema()\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\t})\n+\n+\tAfterEach(func() {\n+\t\terr := sqlClient.Close()\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\t\terr = dbhelper.DropDB(connstr)\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\t})\n+\n+\tIt(\"does no conversion for resources that are billed in GBP\", func() {\n+\t\tguid := \"00000001-0000-0000-0000-000000000000\"\n+\t\tspaceGUID := \"00000001-0001-0000-0000-000000000000\"\n+\n+\t\tcreateScenario(\n+\t\t\tguid,\n+\t\t\tspaceGUID,\n+\t\t\tstart,\n+\t\t\t[][]string{\n+\t\t\t\t{\"GBP\", \"$time_in_seconds\"},\n+\t\t\t},\n+\t\t)\n+\n+\t\tvar out interface{}\n+\n+\t\trequest(\n+\t\t\t\"/organisations/\"+guid+\"/spaces\",\n+\t\t\tstart,\n+\t\t\tstart.Add(2*24*time.Hour),\n+\t\t\t&out,\n+\t\t)\n+\n+\t\texpectedPrice :=\n+\t\t\t2 * // days\n+\t\t\t\t24 * 3600 * // seconds in a day\n+\t\t\t\t1.0 * // GBP => GBP\n+\t\t\t\t100 // pences\n+\n+\t\tExpectJSON(out, []map[string]interface{}{\n+\t\t\t{\n+\t\t\t\t\"org_guid\":               guid,\n+\t\t\t\t\"space_guid\":             spaceGUID,\n+\t\t\t\t\"price_in_pence_ex_vat\":  expectedPrice,\n+\t\t\t\t\"price_in_pence_inc_vat\": expectedPrice * 1.20,\n+\t\t\t},\n+\t\t})\n+\t})\n+\n+\tIt(\"does a conversion to GBP for resources billed in USD\", func() {\n+\t\tguid := \"00000001-0000-0000-0000-000000000000\"\n+\t\tspaceGUID := \"00000001-0001-0000-0000-000000000000\"\n+\n+\t\tcreateScenario(\n+\t\t\tguid,\n+\t\t\tspaceGUID,\n+\t\t\tstart,\n+\t\t\t[][]string{\n+\t\t\t\t{\"USD\", \"$time_in_seconds\"},\n+\t\t\t},\n+\t\t)\n+\n+\t\taddCurrency(\"USD\", 0.5, start)\n+\n+\t\tvar out interface{}\n+\n+\t\trequest(\n+\t\t\t\"/organisations/\"+guid+\"/spaces\",\n+\t\t\tstart,\n+\t\t\tstart.Add(2*24*time.Hour),\n+\t\t\t&out,\n+\t\t)\n+\n+\t\texpectedPrice :=\n+\t\t\t2 * // days\n+\t\t\t\t24 * 3600 * // seconds in a day\n+\t\t\t\t0.5 * // USD => GBP\n+\t\t\t\t100 // pences\n+\n+\t\tExpectJSON(out, []map[string]interface{}{\n+\t\t\t{\n+\t\t\t\t\"org_guid\":               guid,\n+\t\t\t\t\"space_guid\":             spaceGUID,\n+\t\t\t\t\"price_in_pence_ex_vat\":  expectedPrice,\n+\t\t\t\t\"price_in_pence_inc_vat\": expectedPrice * 1.20,\n+\t\t\t},\n+\t\t})\n+\t})\n+\n+\tIt(\"copes with multiple currency entries with same rate\", func() {","path":"api/currency_conversion_test.go","position":255,"original_position":251,"commit_id":"554634d4af06f312510c2dc565e936ddd3c769e5","original_commit_id":"d956784df18bcf6b15b2fbcdcf4754368741143e","user":{"login":"camelpunch","id":141733,"avatar_url":"https://avatars3.githubusercontent.com/u/141733?v=4","gravatar_id":"","url":"https://api.github.com/users/camelpunch","html_url":"https://github.com/camelpunch","followers_url":"https://api.github.com/users/camelpunch/followers","following_url":"https://api.github.com/users/camelpunch/following{/other_user}","gists_url":"https://api.github.com/users/camelpunch/gists{/gist_id}","starred_url":"https://api.github.com/users/camelpunch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camelpunch/subscriptions","organizations_url":"https://api.github.com/users/camelpunch/orgs","repos_url":"https://api.github.com/users/camelpunch/repos","events_url":"https://api.github.com/users/camelpunch/events{/privacy}","received_events_url":"https://api.github.com/users/camelpunch/received_events","type":"User","site_admin":false},"body":"I can't remember the details, sorry.","created_at":"2018-03-13T13:38:28Z","updated_at":"2018-03-13T13:38:28Z","html_url":"https://github.com/alphagov/paas-billing/pull/21#discussion_r174131255","pull_request_url":"https://api.github.com/repos/alphagov/paas-billing/pulls/21","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/alphagov/paas-billing/pulls/comments/174131255"},"html":{"href":"https://github.com/alphagov/paas-billing/pull/21#discussion_r174131255"},"pull_request":{"href":"https://api.github.com/repos/alphagov/paas-billing/pulls/21"}},"in_reply_to_id":174102756},"pull_request":{"url":"https://api.github.com/repos/alphagov/paas-billing/pulls/21","id":174414742,"html_url":"https://github.com/alphagov/paas-billing/pull/21","diff_url":"https://github.com/alphagov/paas-billing/pull/21.diff","patch_url":"https://github.com/alphagov/paas-billing/pull/21.patch","issue_url":"https://api.github.com/repos/alphagov/paas-billing/issues/21","number":21,"state":"open","locked":false,"title":"[#154627257] Handling currency exchange rates","user":{"login":"keymon","id":280032,"avatar_url":"https://avatars0.githubusercontent.com/u/280032?v=4","gravatar_id":"","url":"https://api.github.com/users/keymon","html_url":"https://github.com/keymon","followers_url":"https://api.github.com/users/keymon/followers","following_url":"https://api.github.com/users/keymon/following{/other_user}","gists_url":"https://api.github.com/users/keymon/gists{/gist_id}","starred_url":"https://api.github.com/users/keymon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keymon/subscriptions","organizations_url":"https://api.github.com/users/keymon/orgs","repos_url":"https://api.github.com/users/keymon/repos","events_url":"https://api.github.com/users/keymon/events{/privacy}","received_events_url":"https://api.github.com/users/keymon/received_events","type":"User","site_admin":false},"body":"[#154627257 Handling currency exchange rates](https://www.pivotaltracker.com/story/show/154627257)\n\nWhat?\n-----\n\nWe want to be able to be able to handle exchange rates without resorting to hardcoding constants in our formulas or code.\n\nMany of our providers bill in USD but we need to bill in GBP. We currently hardcode an exchange rate in paas-billing to handle conversion.\n\nIn this PR we implement such logic by creating a new currency table. The values are merged following a similar implementation as the pricin_plans tables, see the commits for details.\n\nKnown limitations\n-----------------\n\n - If there are no currency values added for a currency, the app will not generate any report or will set the values to 0. It is a similar problem than pricing plans.\n\n - The implementation is similar to how the pricing plans are defined, but different to the VAT implementation. We might want to change the VAT implementation to also work with time windows.\n\n - We do not expose any information about exchange rates after compute the `monetized_resources` query. A follow up story should add the required changes.\n\n - We discussed to delay applying VAT and exchange rates, instead of doing it in the `monetized_resources` query. This can be done in a follow up story.\n\n\nHow to review?\n--------------\n\n - Code review\n\nWho?\n----\n\nAnyone but @keymon, @camelpunch or @samcrang","created_at":"2018-03-12T16:00:58Z","updated_at":"2018-03-13T13:38:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9021906c5bf7ad4e5c2fe982267dd59861224ea3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/paas-billing/pulls/21/commits","review_comments_url":"https://api.github.com/repos/alphagov/paas-billing/pulls/21/comments","review_comment_url":"https://api.github.com/repos/alphagov/paas-billing/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/paas-billing/issues/21/comments","statuses_url":"https://api.github.com/repos/alphagov/paas-billing/statuses/554634d4af06f312510c2dc565e936ddd3c769e5","head":{"label":"alphagov:154627257_support_currency_rates","ref":"154627257_support_currency_rates","sha":"554634d4af06f312510c2dc565e936ddd3c769e5","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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":106835027,"name":"paas-billing","full_name":"alphagov/paas-billing","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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/paas-billing","description":"A Go app for polling the CF API for usage events","fork":false,"url":"https://api.github.com/repos/alphagov/paas-billing","forks_url":"https://api.github.com/repos/alphagov/paas-billing/forks","keys_url":"https://api.github.com/repos/alphagov/paas-billing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/paas-billing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/paas-billing/teams","hooks_url":"https://api.github.com/repos/alphagov/paas-billing/hooks","issue_events_url":"https://api.github.com/repos/alphagov/paas-billing/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/paas-billing/events","assignees_url":"https://api.github.com/repos/alphagov/paas-billing/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/paas-billing/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/paas-billing/tags","blobs_url":"https://api.github.com/repos/alphagov/paas-billing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/paas-billing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/paas-billing/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/paas-billing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/paas-billing/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/paas-billing/languages","stargazers_url":"https://api.github.com/repos/alphagov/paas-billing/stargazers","contributors_url":"https://api.github.com/repos/alphagov/paas-billing/contributors","subscribers_url":"https://api.github.com/repos/alphagov/paas-billing/subscribers","subscription_url":"https://api.github.com/repos/alphagov/paas-billing/subscription","commits_url":"https://api.github.com/repos/alphagov/paas-billing/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/paas-billing/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/paas-billing/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/paas-billing/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/paas-billing/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/paas-billing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/paas-billing/merges","archive_url":"https://api.github.com/repos/alphagov/paas-billing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/paas-billing/downloads","issues_url":"https://api.github.com/repos/alphagov/paas-billing/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/paas-billing/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/paas-billing/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/paas-billing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/paas-billing/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/paas-billing/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/paas-billing/deployments","created_at":"2017-10-13T14:31:13Z","updated_at":"2018-03-12T18:07:10Z","pushed_at":"2018-03-13T12:46:15Z","git_url":"git://github.com/alphagov/paas-billing.git","ssh_url":"git@github.com:alphagov/paas-billing.git","clone_url":"https://github.com/alphagov/paas-billing.git","svn_url":"https://github.com/alphagov/paas-billing","homepage":null,"size":9581,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"a52c827ee75d5d540555437c4fa1ef6d8ac1d296","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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":106835027,"name":"paas-billing","full_name":"alphagov/paas-billing","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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/paas-billing","description":"A Go app for polling the CF API for usage events","fork":false,"url":"https://api.github.com/repos/alphagov/paas-billing","forks_url":"https://api.github.com/repos/alphagov/paas-billing/forks","keys_url":"https://api.github.com/repos/alphagov/paas-billing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/paas-billing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/paas-billing/teams","hooks_url":"https://api.github.com/repos/alphagov/paas-billing/hooks","issue_events_url":"https://api.github.com/repos/alphagov/paas-billing/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/paas-billing/events","assignees_url":"https://api.github.com/repos/alphagov/paas-billing/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/paas-billing/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/paas-billing/tags","blobs_url":"https://api.github.com/repos/alphagov/paas-billing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/paas-billing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/paas-billing/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/paas-billing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/paas-billing/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/paas-billing/languages","stargazers_url":"https://api.github.com/repos/alphagov/paas-billing/stargazers","contributors_url":"https://api.github.com/repos/alphagov/paas-billing/contributors","subscribers_url":"https://api.github.com/repos/alphagov/paas-billing/subscribers","subscription_url":"https://api.github.com/repos/alphagov/paas-billing/subscription","commits_url":"https://api.github.com/repos/alphagov/paas-billing/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/paas-billing/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/paas-billing/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/paas-billing/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/paas-billing/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/paas-billing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/paas-billing/merges","archive_url":"https://api.github.com/repos/alphagov/paas-billing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/paas-billing/downloads","issues_url":"https://api.github.com/repos/alphagov/paas-billing/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/paas-billing/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/paas-billing/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/paas-billing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/paas-billing/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/paas-billing/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/paas-billing/deployments","created_at":"2017-10-13T14:31:13Z","updated_at":"2018-03-12T18:07:10Z","pushed_at":"2018-03-13T12:46:15Z","git_url":"git://github.com/alphagov/paas-billing.git","ssh_url":"git@github.com:alphagov/paas-billing.git","clone_url":"https://github.com/alphagov/paas-billing.git","svn_url":"https://github.com/alphagov/paas-billing","homepage":null,"size":9581,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/paas-billing/pulls/21"},"html":{"href":"https://github.com/alphagov/paas-billing/pull/21"},"issue":{"href":"https://api.github.com/repos/alphagov/paas-billing/issues/21"},"comments":{"href":"https://api.github.com/repos/alphagov/paas-billing/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/paas-billing/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/paas-billing/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/paas-billing/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/paas-billing/statuses/554634d4af06f312510c2dc565e936ddd3c769e5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"camelpunch"}}