{"action":"created","issue":{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/1021","repository_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork","labels_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/1021/labels{/name}","comments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/1021/comments","events_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/1021/events","html_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/1021","id":157809779,"number":1021,"title":"Show version","user":{"login":"bingxie","id":1144652,"avatar_url":"https://avatars.githubusercontent.com/u/1144652?v=3","gravatar_id":"","url":"https://api.github.com/users/bingxie","html_url":"https://github.com/bingxie","followers_url":"https://api.github.com/users/bingxie/followers","following_url":"https://api.github.com/users/bingxie/following{/other_user}","gists_url":"https://api.github.com/users/bingxie/gists{/gist_id}","starred_url":"https://api.github.com/users/bingxie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bingxie/subscriptions","organizations_url":"https://api.github.com/users/bingxie/orgs","repos_url":"https://api.github.com/users/bingxie/repos","events_url":"https://api.github.com/users/bingxie/events{/privacy}","received_events_url":"https://api.github.com/users/bingxie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/labels/aus%20review","name":"aus review","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-01T02:20:06Z","updated_at":"2016-06-15T06:24:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/1021","html_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/1021","diff_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/1021.diff","patch_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/1021.patch"},"body":"Display the version on two places.\r\n![snip20160601_1](https://cloud.githubusercontent.com/assets/1144652/15696373/252b3a90-27f3-11e6-88b3-17b2da11d556.png)\r\n![snip20160601_2](https://cloud.githubusercontent.com/assets/1144652/15696374/25309efe-27f3-11e6-93c2-b254dc496b1f.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/comments/226098732","html_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/1021#issuecomment-226098732","issue_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/1021","id":226098732,"user":{"login":"oeoeaio","id":2067859,"avatar_url":"https://avatars.githubusercontent.com/u/2067859?v=3","gravatar_id":"","url":"https://api.github.com/users/oeoeaio","html_url":"https://github.com/oeoeaio","followers_url":"https://api.github.com/users/oeoeaio/followers","following_url":"https://api.github.com/users/oeoeaio/following{/other_user}","gists_url":"https://api.github.com/users/oeoeaio/gists{/gist_id}","starred_url":"https://api.github.com/users/oeoeaio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oeoeaio/subscriptions","organizations_url":"https://api.github.com/users/oeoeaio/orgs","repos_url":"https://api.github.com/users/oeoeaio/repos","events_url":"https://api.github.com/users/oeoeaio/events{/privacy}","received_events_url":"https://api.github.com/users/oeoeaio/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T06:24:19Z","updated_at":"2016-06-15T06:24:19Z","body":"Hey @mkllnk and @bingxie, Rohan and I are just looking at this, and we've noticed a bit of an issue. The logic here depends on the existence of a tag for the version number, which is very dependent on the particular workflow being used, and also on the way that tags are used.\r\n\r\nFor example, the last tag on our production server in Aus will always be the **previous** version, rather than the current one, because the current release is generally only created in GitHub **after** we have pushed to production (which is when tags on the server will be updated). This means that this logic will work quite well on Aus production for intermediate pushes to prod, but not at all for actual releases.\r\n\r\nThe second consideration is that it restricts the use of tags to releases only - not sure how big an issue this is, but probably not a good idea to assume this will always be the case.\r\n\r\nWe thought it might be better to use the GitHub API to determine whether the current server commit is a release commit, and if so, to use that version number. This request could be cached, and only invalidated on server initialisation.\r\n\r\nWhere the server commit does not match a release commit, we can just display the SHA - this will probably only ever happen on Australian production...\r\n\r\nHow does that sound?"}}
{"actor":{"display_login":"oeoeaio"}}