{"action":"created","comment":{"url":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/comments/219493214","pull_request_review_id":157684961,"id":219493214,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTQ5MzIxNA==","diff_hunk":"@@ -53,7 +53,7 @@ class FunctionsApi {\n         endpoint = this.baseURL + '/function/' + item.name;\n       }\n \n-      let shortSha = item.labels['Git-SHA'];\n+      let shortSha = item.labels['com.openfaas.cloud.git-SHA'];","path":"dashboard/client/src/api/functionsApi.js","position":31,"original_position":31,"commit_id":"eebb48258f73f693cba426a085af9fe0d4c61163","original_commit_id":"eebb48258f73f693cba426a085af9fe0d4c61163","user":{"login":"alexellis","id":6358735,"node_id":"MDQ6VXNlcjYzNTg3MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/6358735?v=4","gravatar_id":"","url":"https://api.github.com/users/alexellis","html_url":"https://github.com/alexellis","followers_url":"https://api.github.com/users/alexellis/followers","following_url":"https://api.github.com/users/alexellis/following{/other_user}","gists_url":"https://api.github.com/users/alexellis/gists{/gist_id}","starred_url":"https://api.github.com/users/alexellis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexellis/subscriptions","organizations_url":"https://api.github.com/users/alexellis/orgs","repos_url":"https://api.github.com/users/alexellis/repos","events_url":"https://api.github.com/users/alexellis/events{/privacy}","received_events_url":"https://api.github.com/users/alexellis/received_events","type":"User","site_admin":false},"body":"I'm going to guess we should make `SHA` lower too so that it matches everything else?","created_at":"2018-09-21T13:17:30Z","updated_at":"2018-09-21T13:17:30Z","html_url":"https://github.com/openfaas/openfaas-cloud/pull/159#discussion_r219493214","pull_request_url":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/159","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/comments/219493214"},"html":{"href":"https://github.com/openfaas/openfaas-cloud/pull/159#discussion_r219493214"},"pull_request":{"href":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/159"}}},"pull_request":{"url":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/159","id":214580006,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NTgwMDA2","html_url":"https://github.com/openfaas/openfaas-cloud/pull/159","diff_url":"https://github.com/openfaas/openfaas-cloud/pull/159.diff","patch_url":"https://github.com/openfaas/openfaas-cloud/pull/159.patch","issue_url":"https://api.github.com/repos/openfaas/openfaas-cloud/issues/159","number":159,"state":"open","locked":false,"title":"Add prefix of `com.openfaas.cloud.` to labels","user":{"login":"martindekov","id":34942004,"node_id":"MDQ6VXNlcjM0OTQyMDA0","avatar_url":"https://avatars1.githubusercontent.com/u/34942004?v=4","gravatar_id":"","url":"https://api.github.com/users/martindekov","html_url":"https://github.com/martindekov","followers_url":"https://api.github.com/users/martindekov/followers","following_url":"https://api.github.com/users/martindekov/following{/other_user}","gists_url":"https://api.github.com/users/martindekov/gists{/gist_id}","starred_url":"https://api.github.com/users/martindekov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martindekov/subscriptions","organizations_url":"https://api.github.com/users/martindekov/orgs","repos_url":"https://api.github.com/users/martindekov/repos","events_url":"https://api.github.com/users/martindekov/events{/privacy}","received_events_url":"https://api.github.com/users/martindekov/received_events","type":"User","site_admin":false},"body":"Updating the labels that buildshiprun applies when creating\r\nfunctions by lowercasing them (except git-SHA) and appending\r\n`com.openfaas.cloud.` prefix in front of the label also\r\nchanged the label handling in garbage-collect, list-functions\r\nand index.html in overview dashboard\r\n\r\nSigned-off-by: Martin Dekov (VMware) <mdekov@vmware.com>\r\n\r\n## Description\r\n\r\nIn `buildshiprun` we apply labels to the function and I modified the labels from `Git-Repo`->`com.openfaas.cloud.git-repo` also small alternation in `list-functions` `overview` and `garbage-collect` to handle the change\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\nTested end to end the following ways:\r\n\r\nDeployed dashboard with the following `pretty_url` configuration and of-router on the following way\r\n```\r\n...\r\n      pretty_url: \"http://user.team-serverless.xyz/function\"\r\n      query_pretty_url: \"true\"\r\n...\r\n```\r\nthe output of `https://md-gw.team-serverless.xyz/system/function/martindekov-gocloudfunc` is\r\n```\r\n{\"name\":\"martindekov-gocloudfunc\",\"image\":\"md-reg.team-serverless.xyz/martindekov/gocloudfunc-gocloudfunc:latest-4aa81b8\",\"invocationCount\":0,\"replicas\":1,\"envProcess\":\"\",\"availableReplicas\":1,\"labels\":{\"com.openfaas.cloud.app\":\"martindekov-gocloudfunc\",\"com.openfaas.cloud.faas_function\":\"martindekov-gocloudfunc\",\"com.openfaas.cloud.git-SHA\":\"4aa81b8e859b7487fbfbe6518b49ff4bc0384d09\",\"com.openfaas.cloud.git-cloud\":\"1\",\"com.openfaas.cloud.git-deploytime\":\"1536656802\",\"com.openfaas.cloud.git-owner\":\"martindekov\",\"com.openfaas.cloud.git-repo\":\"gocloudfunc\",\"com.openfaas.function\":\"martindekov-gocloudfunc\",\"function\":\"true\"}}\r\n```\r\nwhich shows that the prefixes are applied in the intended places\r\n\r\nTested garbage collect by removing the OF installation from repo resulting in removed function in cloud.\r\n\r\nTested the logs just in case they work with the change. \r\n\r\nTested the `Repo` `Endpoint` `Logs` with my case sensitive github account everything referenced the right thing and the `system-list-functions` output is:\r\n```\r\n{\"name\":\"martindekovwat-goforfun\",\"image\":\"md-reg.team-serverless.xyz/martindekovwat/exmpl-goforfun:latest-e2d1646\",\"invocationCount\":0,\"replicas\":1,\"envProcess\":\"\",\"availableReplicas\":1,\"labels\":{\"com.openfaas.cloud.app\":\"martindekovwat-goforfun\",\"com.openfaas.cloud.faas_function\":\"martindekovwat-goforfun\",\"com.openfaas.cloud.git-SHA\":\"e2d1646c72570a218c9c1ce037fd788a70fdc5e7\",\"com.openfaas.cloud.git-cloud\":\"1\",\"com.openfaas.cloud.git-deploytime\":\"1536662023\",\"com.openfaas.cloud.git-owner\":\"MartinDekovWat\",\"com.openfaas.cloud.git-repo\":\"exmpl\",\"com.openfaas.function\":\"martindekovwat-goforfun\",\"function\":\"true\"}}\r\n```\r\n\r\nCloses #155 \r\n\r\nNote: The functions need to be redeployed for the change to work\r\n\r\n## Checklist:\r\n\r\nI have:\r\n\r\n- [ ] updated the documentation if required\r\n- [x] read the [CONTRIBUTION](https://github.com/openfaas/faas/blob/master/CONTRIBUTING.md) guide\r\n- [x] signed-off my commits with `git commit -s`\r\n- [ ] added unit tests\r\n\r\n","created_at":"2018-09-11T10:08:19Z","updated_at":"2018-09-21T13:17:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34a672ec8ef5e385af5e47f5c15a0177cfbacc13","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/159/commits","review_comments_url":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/159/comments","review_comment_url":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openfaas/openfaas-cloud/issues/159/comments","statuses_url":"https://api.github.com/repos/openfaas/openfaas-cloud/statuses/eebb48258f73f693cba426a085af9fe0d4c61163","head":{"label":"martindekov:martindekov/155_prefix_labels_com.openfaas.cloud","ref":"martindekov/155_prefix_labels_com.openfaas.cloud","sha":"eebb48258f73f693cba426a085af9fe0d4c61163","user":{"login":"martindekov","id":34942004,"node_id":"MDQ6VXNlcjM0OTQyMDA0","avatar_url":"https://avatars1.githubusercontent.com/u/34942004?v=4","gravatar_id":"","url":"https://api.github.com/users/martindekov","html_url":"https://github.com/martindekov","followers_url":"https://api.github.com/users/martindekov/followers","following_url":"https://api.github.com/users/martindekov/following{/other_user}","gists_url":"https://api.github.com/users/martindekov/gists{/gist_id}","starred_url":"https://api.github.com/users/martindekov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martindekov/subscriptions","organizations_url":"https://api.github.com/users/martindekov/orgs","repos_url":"https://api.github.com/users/martindekov/repos","events_url":"https://api.github.com/users/martindekov/events{/privacy}","received_events_url":"https://api.github.com/users/martindekov/received_events","type":"User","site_admin":false},"repo":{"id":142837971,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI4Mzc5NzE=","name":"openfaas-cloud","full_name":"martindekov/openfaas-cloud","private":false,"owner":{"login":"martindekov","id":34942004,"node_id":"MDQ6VXNlcjM0OTQyMDA0","avatar_url":"https://avatars1.githubusercontent.com/u/34942004?v=4","gravatar_id":"","url":"https://api.github.com/users/martindekov","html_url":"https://github.com/martindekov","followers_url":"https://api.github.com/users/martindekov/followers","following_url":"https://api.github.com/users/martindekov/following{/other_user}","gists_url":"https://api.github.com/users/martindekov/gists{/gist_id}","starred_url":"https://api.github.com/users/martindekov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martindekov/subscriptions","organizations_url":"https://api.github.com/users/martindekov/orgs","repos_url":"https://api.github.com/users/martindekov/repos","events_url":"https://api.github.com/users/martindekov/events{/privacy}","received_events_url":"https://api.github.com/users/martindekov/received_events","type":"User","site_admin":false},"html_url":"https://github.com/martindekov/openfaas-cloud","description":"OpenFaaS Cloud - GitOps for your functions with native GitHub integrations","fork":true,"url":"https://api.github.com/repos/martindekov/openfaas-cloud","forks_url":"https://api.github.com/repos/martindekov/openfaas-cloud/forks","keys_url":"https://api.github.com/repos/martindekov/openfaas-cloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martindekov/openfaas-cloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martindekov/openfaas-cloud/teams","hooks_url":"https://api.github.com/repos/martindekov/openfaas-cloud/hooks","issue_events_url":"https://api.github.com/repos/martindekov/openfaas-cloud/issues/events{/number}","events_url":"https://api.github.com/repos/martindekov/openfaas-cloud/events","assignees_url":"https://api.github.com/repos/martindekov/openfaas-cloud/assignees{/user}","branches_url":"https://api.github.com/repos/martindekov/openfaas-cloud/branches{/branch}","tags_url":"https://api.github.com/repos/martindekov/openfaas-cloud/tags","blobs_url":"https://api.github.com/repos/martindekov/openfaas-cloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martindekov/openfaas-cloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martindekov/openfaas-cloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/martindekov/openfaas-cloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martindekov/openfaas-cloud/statuses/{sha}","languages_url":"https://api.github.com/repos/martindekov/openfaas-cloud/languages","stargazers_url":"https://api.github.com/repos/martindekov/openfaas-cloud/stargazers","contributors_url":"https://api.github.com/repos/martindekov/openfaas-cloud/contributors","subscribers_url":"https://api.github.com/repos/martindekov/openfaas-cloud/subscribers","subscription_url":"https://api.github.com/repos/martindekov/openfaas-cloud/subscription","commits_url":"https://api.github.com/repos/martindekov/openfaas-cloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/martindekov/openfaas-cloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/martindekov/openfaas-cloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/martindekov/openfaas-cloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/martindekov/openfaas-cloud/contents/{+path}","compare_url":"https://api.github.com/repos/martindekov/openfaas-cloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martindekov/openfaas-cloud/merges","archive_url":"https://api.github.com/repos/martindekov/openfaas-cloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martindekov/openfaas-cloud/downloads","issues_url":"https://api.github.com/repos/martindekov/openfaas-cloud/issues{/number}","pulls_url":"https://api.github.com/repos/martindekov/openfaas-cloud/pulls{/number}","milestones_url":"https://api.github.com/repos/martindekov/openfaas-cloud/milestones{/number}","notifications_url":"https://api.github.com/repos/martindekov/openfaas-cloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martindekov/openfaas-cloud/labels{/name}","releases_url":"https://api.github.com/repos/martindekov/openfaas-cloud/releases{/id}","deployments_url":"https://api.github.com/repos/martindekov/openfaas-cloud/deployments","created_at":"2018-07-30T07:04:55Z","updated_at":"2018-09-14T12:11:59Z","pushed_at":"2018-09-20T10:54:18Z","git_url":"git://github.com/martindekov/openfaas-cloud.git","ssh_url":"git@github.com:martindekov/openfaas-cloud.git","clone_url":"https://github.com/martindekov/openfaas-cloud.git","svn_url":"https://github.com/martindekov/openfaas-cloud","homepage":"https://blog.alexellis.io/introducing-openfaas-cloud/","size":16357,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openfaas:master","ref":"master","sha":"93d45b78b5a48166faafaed088c03f7c8fce4842","user":{"login":"openfaas","id":27013154,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3MDEzMTU0","avatar_url":"https://avatars3.githubusercontent.com/u/27013154?v=4","gravatar_id":"","url":"https://api.github.com/users/openfaas","html_url":"https://github.com/openfaas","followers_url":"https://api.github.com/users/openfaas/followers","following_url":"https://api.github.com/users/openfaas/following{/other_user}","gists_url":"https://api.github.com/users/openfaas/gists{/gist_id}","starred_url":"https://api.github.com/users/openfaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfaas/subscriptions","organizations_url":"https://api.github.com/users/openfaas/orgs","repos_url":"https://api.github.com/users/openfaas/repos","events_url":"https://api.github.com/users/openfaas/events{/privacy}","received_events_url":"https://api.github.com/users/openfaas/received_events","type":"Organization","site_admin":false},"repo":{"id":109512938,"node_id":"MDEwOlJlcG9zaXRvcnkxMDk1MTI5Mzg=","name":"openfaas-cloud","full_name":"openfaas/openfaas-cloud","private":false,"owner":{"login":"openfaas","id":27013154,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3MDEzMTU0","avatar_url":"https://avatars3.githubusercontent.com/u/27013154?v=4","gravatar_id":"","url":"https://api.github.com/users/openfaas","html_url":"https://github.com/openfaas","followers_url":"https://api.github.com/users/openfaas/followers","following_url":"https://api.github.com/users/openfaas/following{/other_user}","gists_url":"https://api.github.com/users/openfaas/gists{/gist_id}","starred_url":"https://api.github.com/users/openfaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfaas/subscriptions","organizations_url":"https://api.github.com/users/openfaas/orgs","repos_url":"https://api.github.com/users/openfaas/repos","events_url":"https://api.github.com/users/openfaas/events{/privacy}","received_events_url":"https://api.github.com/users/openfaas/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openfaas/openfaas-cloud","description":"OpenFaaS Cloud - multi-user GitOps for your functions","fork":false,"url":"https://api.github.com/repos/openfaas/openfaas-cloud","forks_url":"https://api.github.com/repos/openfaas/openfaas-cloud/forks","keys_url":"https://api.github.com/repos/openfaas/openfaas-cloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfaas/openfaas-cloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfaas/openfaas-cloud/teams","hooks_url":"https://api.github.com/repos/openfaas/openfaas-cloud/hooks","issue_events_url":"https://api.github.com/repos/openfaas/openfaas-cloud/issues/events{/number}","events_url":"https://api.github.com/repos/openfaas/openfaas-cloud/events","assignees_url":"https://api.github.com/repos/openfaas/openfaas-cloud/assignees{/user}","branches_url":"https://api.github.com/repos/openfaas/openfaas-cloud/branches{/branch}","tags_url":"https://api.github.com/repos/openfaas/openfaas-cloud/tags","blobs_url":"https://api.github.com/repos/openfaas/openfaas-cloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfaas/openfaas-cloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfaas/openfaas-cloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfaas/openfaas-cloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfaas/openfaas-cloud/statuses/{sha}","languages_url":"https://api.github.com/repos/openfaas/openfaas-cloud/languages","stargazers_url":"https://api.github.com/repos/openfaas/openfaas-cloud/stargazers","contributors_url":"https://api.github.com/repos/openfaas/openfaas-cloud/contributors","subscribers_url":"https://api.github.com/repos/openfaas/openfaas-cloud/subscribers","subscription_url":"https://api.github.com/repos/openfaas/openfaas-cloud/subscription","commits_url":"https://api.github.com/repos/openfaas/openfaas-cloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfaas/openfaas-cloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfaas/openfaas-cloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfaas/openfaas-cloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfaas/openfaas-cloud/contents/{+path}","compare_url":"https://api.github.com/repos/openfaas/openfaas-cloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfaas/openfaas-cloud/merges","archive_url":"https://api.github.com/repos/openfaas/openfaas-cloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfaas/openfaas-cloud/downloads","issues_url":"https://api.github.com/repos/openfaas/openfaas-cloud/issues{/number}","pulls_url":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls{/number}","milestones_url":"https://api.github.com/repos/openfaas/openfaas-cloud/milestones{/number}","notifications_url":"https://api.github.com/repos/openfaas/openfaas-cloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfaas/openfaas-cloud/labels{/name}","releases_url":"https://api.github.com/repos/openfaas/openfaas-cloud/releases{/id}","deployments_url":"https://api.github.com/repos/openfaas/openfaas-cloud/deployments","created_at":"2017-11-04T16:54:15Z","updated_at":"2018-09-21T13:16:09Z","pushed_at":"2018-09-21T13:16:06Z","git_url":"git://github.com/openfaas/openfaas-cloud.git","ssh_url":"git@github.com:openfaas/openfaas-cloud.git","clone_url":"https://github.com/openfaas/openfaas-cloud.git","svn_url":"https://github.com/openfaas/openfaas-cloud","homepage":"https://blog.alexellis.io/introducing-openfaas-cloud/","size":16360,"stargazers_count":108,"watchers_count":108,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":41,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":38,"open_issues":41,"watchers":108,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/159"},"html":{"href":"https://github.com/openfaas/openfaas-cloud/pull/159"},"issue":{"href":"https://api.github.com/repos/openfaas/openfaas-cloud/issues/159"},"comments":{"href":"https://api.github.com/repos/openfaas/openfaas-cloud/issues/159/comments"},"review_comments":{"href":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/159/comments"},"review_comment":{"href":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openfaas/openfaas-cloud/pulls/159/commits"},"statuses":{"href":"https://api.github.com/repos/openfaas/openfaas-cloud/statuses/eebb48258f73f693cba426a085af9fe0d4c61163"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"alexellis"}}