{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-config/issues/571","repository_url":"https://api.github.com/repos/spring-cloud/spring-cloud-config","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-config/issues/571/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-config/issues/571/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-config/issues/571/events","html_url":"https://github.com/spring-cloud/spring-cloud-config/issues/571","id":192236737,"number":571,"title":"Problem with Health Indicator.","user":{"login":"eacdy","id":9031050,"avatar_url":"https://avatars.githubusercontent.com/u/9031050?v=3","gravatar_id":"","url":"https://api.github.com/users/eacdy","html_url":"https://github.com/eacdy","followers_url":"https://api.github.com/users/eacdy/followers","following_url":"https://api.github.com/users/eacdy/following{/other_user}","gists_url":"https://api.github.com/users/eacdy/gists{/gist_id}","starred_url":"https://api.github.com/users/eacdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eacdy/subscriptions","organizations_url":"https://api.github.com/users/eacdy/orgs","repos_url":"https://api.github.com/users/eacdy/repos","events_url":"https://api.github.com/users/eacdy/events{/privacy}","received_events_url":"https://api.github.com/users/eacdy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-29T10:00:07Z","updated_at":"2016-12-01T08:57:28Z","closed_at":null,"body":"I've build a simple config server to test the [Health Indicator](http://cloud.spring.io/spring-cloud-static/Camden.SR2/#_health_indicator) .\r\n\r\nHere goes my configuration:\r\n\r\n```\r\nserver:\r\n  port: 8080\r\nspring:\r\n  application:\r\n    name: microservice-config-server\r\n  cloud:\r\n    config:\r\n      server:\r\n        git:\r\n          uri: https://github.com/eacdy/spring-cloud-test-for-issue/\r\n          username: null\r\n          password: null\r\n          search-paths:\r\n            - config-repo\r\n        health:\r\n          repositories:\r\n            a-foo:\r\n              label: master\r\n              name: microservice-foo\r\n              profiles: dev\r\n```\r\n\r\nWhen I come to the /health endpoint, I can get this:\r\n\r\n```json\r\n{\r\n    \"status\": \"UP\",\r\n    \"configServer\": {\r\n        \"status\": \"UP\",\r\n        \"repositories\": [\r\n            {\r\n                \"sources\": [\r\n                    \"https://github.com/eacdy/spring-cloud-test-for-issue/config-repo/microservice-foo-dev.properties\",\r\n                    \"https://github.com/eacdy/spring-cloud-test-for-issue/config-repo/microservice-foo.properties\"\r\n                ],\r\n                \"name\": \"microservice-foo\",\r\n                \"profiles\": [\r\n                    \"dev\"\r\n                ],\r\n                \"label\": \"master\"\r\n            }\r\n        ]\r\n    },\r\n    \"diskSpace\": {\r\n        \"status\": \"UP\",\r\n        \"total\": 107376275456,\r\n        \"free\": 26694565888,\r\n        \"threshold\": 10485760\r\n    },\r\n    \"refreshScope\": {\r\n        \"status\": \"UP\"\r\n    }\r\n}\r\n```\r\n\r\nI found that [https://github.com/eacdy/spring-cloud-test-for-issue/config-repo/microservice-foo-dev.properties](https://github.com/eacdy/spring-cloud-test-for-issue/config-repo/microservice-foo-dev.properties) returns 404. The right url is [https://github.com/eacdy/spring-cloud-test-for-issue/blob/master/config-repo/microservice-foo-dev.properties](https://github.com/eacdy/spring-cloud-test-for-issue/blob/master/config-repo/microservice-foo-dev.properties)\r\n\r\n\r\n\r\nCode in `org.springframework.cloud.config.server.environment.EnvironmentCleaner` :\r\n\r\n```\r\n\tpublic Environment clean(Environment value, String workingDir, String uri) {\r\n\t\tEnvironment result = new Environment(value);\r\n\t\tfor (PropertySource source : value.getPropertySources()) {\r\n\t\t\tString name = source.getName().replace(workingDir, \"\");\r\n\t\t\tname = name.replace(\"applicationConfig: [\", \"\");\r\n\t\t\tname = uri + \"/\" + name.replace(\"]\", \"\");\r\n\t\t\tresult.add(new PropertySource(name, source.getSource()));\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n```\r\n\r\nI think it should be \r\n\r\n```\r\n\tpublic Environment clean(Environment value, String workingDir, String uri) {\r\n\t\tEnvironment result = new Environment(value);\r\n\t\tfor (PropertySource source : value.getPropertySources()) {\r\n\t\t\tString name = source.getName().replace(workingDir, \"\");\r\n\t\t\tname = name.replace(\"applicationConfig: [\", \"\");\r\n\t\t\tname = uri + \"/blob/master/\" + name.replace(\"]\", \"\");\r\n\t\t\tresult.add(new PropertySource(name, source.getSource()));\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n```\r\n\r\n\r\n\r\n\r\n\r\nIs it just a bug? Thanks a lot."},"comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-config/issues/comments/264116733","html_url":"https://github.com/spring-cloud/spring-cloud-config/issues/571#issuecomment-264116733","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-config/issues/571","id":264116733,"user":{"login":"eacdy","id":9031050,"avatar_url":"https://avatars.githubusercontent.com/u/9031050?v=3","gravatar_id":"","url":"https://api.github.com/users/eacdy","html_url":"https://github.com/eacdy","followers_url":"https://api.github.com/users/eacdy/followers","following_url":"https://api.github.com/users/eacdy/following{/other_user}","gists_url":"https://api.github.com/users/eacdy/gists{/gist_id}","starred_url":"https://api.github.com/users/eacdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eacdy/subscriptions","organizations_url":"https://api.github.com/users/eacdy/orgs","repos_url":"https://api.github.com/users/eacdy/repos","events_url":"https://api.github.com/users/eacdy/events{/privacy}","received_events_url":"https://api.github.com/users/eacdy/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T08:57:28Z","updated_at":"2016-12-01T08:57:28Z","body":"@dsyer Thank you very much."}}
{"actor":{"display_login":"eacdy"}}