{"action":"closed","number":1667,"pull_request":{"url":"https://api.github.com/repos/strapi/strapi/pulls/1667","id":204968278,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0OTY4Mjc4","html_url":"https://github.com/strapi/strapi/pull/1667","diff_url":"https://github.com/strapi/strapi/pull/1667.diff","patch_url":"https://github.com/strapi/strapi/pull/1667.patch","issue_url":"https://api.github.com/repos/strapi/strapi/issues/1667","number":1667,"state":"closed","locked":false,"title":"Parse environment variables on build configuration","user":{"login":"maturano","id":5768813,"node_id":"MDQ6VXNlcjU3Njg4MTM=","avatar_url":"https://avatars1.githubusercontent.com/u/5768813?v=4","gravatar_id":"","url":"https://api.github.com/users/maturano","html_url":"https://github.com/maturano","followers_url":"https://api.github.com/users/maturano/followers","following_url":"https://api.github.com/users/maturano/following{/other_user}","gists_url":"https://api.github.com/users/maturano/gists{/gist_id}","starred_url":"https://api.github.com/users/maturano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maturano/subscriptions","organizations_url":"https://api.github.com/users/maturano/orgs","repos_url":"https://api.github.com/users/maturano/repos","events_url":"https://api.github.com/users/maturano/events{/privacy}","received_events_url":"https://api.github.com/users/maturano/received_events","type":"User","site_admin":false},"body":"My PR is a: 🐛 Bug fix\r\n<!-- 💅 Enhancement -->\r\n<!-- 🚀 New feature -->\r\nMain update on the: Framework\r\n<!-- Plugin -->\r\n---\r\n<!-- Write a short description of what your PR does and link the concerned issues of your update. -->\r\nCurrently the use of environment variables in the configuration files is allowed, however the values are not replaced building the administration panel. You can clearly see the error if you try to use an environment variable as the value of the `host` parameter in the `server.json` file:\r\n\r\n![serverconfig_withhttp](https://user-images.githubusercontent.com/5768813/42903695-48814fa2-8a98-11e8-9215-8f2d60bc4903.PNG)\r\n\r\nAs can see, the value was used as an ordinary string; they were not replaced by the value of the environment variable.\r\n\r\nThis PR moves the code that makes that interpretation to `strapi-utils` trying to make it a shared functionality. In addition to been invoked originally in the same place, with this changes also it's called by `webpack`, getting a consistent result in the build.\r\n\r\nYou can see here the result of this change:\r\n\r\n![serverconfig_patch](https://user-images.githubusercontent.com/5768813/43471942-e1b1aa96-94b1-11e8-905a-714194391555.png)\r\n\r\n*Notes*:\r\n- I keep the name of the function. Could have a better name maybe?\r\n- Is `strapi-utils` the correct place? 🤔 \r\n---\r\nclose #1590","created_at":"2018-07-31T00:51:44Z","updated_at":"2018-08-09T15:52:41Z","closed_at":"2018-08-09T15:52:41Z","merged_at":"2018-08-09T15:52:41Z","merge_commit_sha":"d30b03fd50211bdcf6b17c8af465023a31bd2125","assignee":{"login":"lauriejim","id":5716596,"node_id":"MDQ6VXNlcjU3MTY1OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/5716596?v=4","gravatar_id":"","url":"https://api.github.com/users/lauriejim","html_url":"https://github.com/lauriejim","followers_url":"https://api.github.com/users/lauriejim/followers","following_url":"https://api.github.com/users/lauriejim/following{/other_user}","gists_url":"https://api.github.com/users/lauriejim/gists{/gist_id}","starred_url":"https://api.github.com/users/lauriejim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauriejim/subscriptions","organizations_url":"https://api.github.com/users/lauriejim/orgs","repos_url":"https://api.github.com/users/lauriejim/repos","events_url":"https://api.github.com/users/lauriejim/events{/privacy}","received_events_url":"https://api.github.com/users/lauriejim/received_events","type":"User","site_admin":false},"assignees":[{"login":"lauriejim","id":5716596,"node_id":"MDQ6VXNlcjU3MTY1OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/5716596?v=4","gravatar_id":"","url":"https://api.github.com/users/lauriejim","html_url":"https://github.com/lauriejim","followers_url":"https://api.github.com/users/lauriejim/followers","following_url":"https://api.github.com/users/lauriejim/following{/other_user}","gists_url":"https://api.github.com/users/lauriejim/gists{/gist_id}","starred_url":"https://api.github.com/users/lauriejim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauriejim/subscriptions","organizations_url":"https://api.github.com/users/lauriejim/orgs","repos_url":"https://api.github.com/users/lauriejim/repos","events_url":"https://api.github.com/users/lauriejim/events{/privacy}","received_events_url":"https://api.github.com/users/lauriejim/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"soupette","id":13311463,"node_id":"MDQ6VXNlcjEzMzExNDYz","avatar_url":"https://avatars2.githubusercontent.com/u/13311463?v=4","gravatar_id":"","url":"https://api.github.com/users/soupette","html_url":"https://github.com/soupette","followers_url":"https://api.github.com/users/soupette/followers","following_url":"https://api.github.com/users/soupette/following{/other_user}","gists_url":"https://api.github.com/users/soupette/gists{/gist_id}","starred_url":"https://api.github.com/users/soupette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soupette/subscriptions","organizations_url":"https://api.github.com/users/soupette/orgs","repos_url":"https://api.github.com/users/soupette/repos","events_url":"https://api.github.com/users/soupette/events{/privacy}","received_events_url":"https://api.github.com/users/soupette/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":881293267,"node_id":"MDU6TGFiZWw4ODEyOTMyNjc=","url":"https://api.github.com/repos/strapi/strapi/labels/pr:%20%F0%9F%92%85%20Enhancement","name":"pr: 💅 Enhancement","color":"84b6eb","default":false},{"id":881295964,"node_id":"MDU6TGFiZWw4ODEyOTU5NjQ=","url":"https://api.github.com/repos/strapi/strapi/labels/source:%20Framework","name":"source: Framework","color":"53319b","default":false}],"milestone":{"url":"https://api.github.com/repos/strapi/strapi/milestones/25","html_url":"https://github.com/strapi/strapi/milestone/25","labels_url":"https://api.github.com/repos/strapi/strapi/milestones/25/labels","id":3558402,"node_id":"MDk6TWlsZXN0b25lMzU1ODQwMg==","number":25,"title":"3.0.0-alpha.13.2","description":"","creator":{"login":"lauriejim","id":5716596,"node_id":"MDQ6VXNlcjU3MTY1OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/5716596?v=4","gravatar_id":"","url":"https://api.github.com/users/lauriejim","html_url":"https://github.com/lauriejim","followers_url":"https://api.github.com/users/lauriejim/followers","following_url":"https://api.github.com/users/lauriejim/following{/other_user}","gists_url":"https://api.github.com/users/lauriejim/gists{/gist_id}","starred_url":"https://api.github.com/users/lauriejim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauriejim/subscriptions","organizations_url":"https://api.github.com/users/lauriejim/orgs","repos_url":"https://api.github.com/users/lauriejim/repos","events_url":"https://api.github.com/users/lauriejim/events{/privacy}","received_events_url":"https://api.github.com/users/lauriejim/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":2,"state":"open","created_at":"2018-08-09T14:06:28Z","updated_at":"2018-08-09T15:52:41Z","due_on":"2018-08-28T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/strapi/strapi/pulls/1667/commits","review_comments_url":"https://api.github.com/repos/strapi/strapi/pulls/1667/comments","review_comment_url":"https://api.github.com/repos/strapi/strapi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strapi/strapi/issues/1667/comments","statuses_url":"https://api.github.com/repos/strapi/strapi/statuses/3853e7845225e96ffa4fa287ab1523035b55aaec","head":{"label":"maturano:bug/1590","ref":"bug/1590","sha":"3853e7845225e96ffa4fa287ab1523035b55aaec","user":{"login":"maturano","id":5768813,"node_id":"MDQ6VXNlcjU3Njg4MTM=","avatar_url":"https://avatars1.githubusercontent.com/u/5768813?v=4","gravatar_id":"","url":"https://api.github.com/users/maturano","html_url":"https://github.com/maturano","followers_url":"https://api.github.com/users/maturano/followers","following_url":"https://api.github.com/users/maturano/following{/other_user}","gists_url":"https://api.github.com/users/maturano/gists{/gist_id}","starred_url":"https://api.github.com/users/maturano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maturano/subscriptions","organizations_url":"https://api.github.com/users/maturano/orgs","repos_url":"https://api.github.com/users/maturano/repos","events_url":"https://api.github.com/users/maturano/events{/privacy}","received_events_url":"https://api.github.com/users/maturano/received_events","type":"User","site_admin":false},"repo":{"id":137535975,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc1MzU5NzU=","name":"strapi","full_name":"maturano/strapi","owner":{"login":"maturano","id":5768813,"node_id":"MDQ6VXNlcjU3Njg4MTM=","avatar_url":"https://avatars1.githubusercontent.com/u/5768813?v=4","gravatar_id":"","url":"https://api.github.com/users/maturano","html_url":"https://github.com/maturano","followers_url":"https://api.github.com/users/maturano/followers","following_url":"https://api.github.com/users/maturano/following{/other_user}","gists_url":"https://api.github.com/users/maturano/gists{/gist_id}","starred_url":"https://api.github.com/users/maturano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maturano/subscriptions","organizations_url":"https://api.github.com/users/maturano/orgs","repos_url":"https://api.github.com/users/maturano/repos","events_url":"https://api.github.com/users/maturano/events{/privacy}","received_events_url":"https://api.github.com/users/maturano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maturano/strapi","description":":rocket: Node.js Content Management Framework (headless-CMS) to build powerful API with no effort.","fork":true,"url":"https://api.github.com/repos/maturano/strapi","forks_url":"https://api.github.com/repos/maturano/strapi/forks","keys_url":"https://api.github.com/repos/maturano/strapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maturano/strapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maturano/strapi/teams","hooks_url":"https://api.github.com/repos/maturano/strapi/hooks","issue_events_url":"https://api.github.com/repos/maturano/strapi/issues/events{/number}","events_url":"https://api.github.com/repos/maturano/strapi/events","assignees_url":"https://api.github.com/repos/maturano/strapi/assignees{/user}","branches_url":"https://api.github.com/repos/maturano/strapi/branches{/branch}","tags_url":"https://api.github.com/repos/maturano/strapi/tags","blobs_url":"https://api.github.com/repos/maturano/strapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maturano/strapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maturano/strapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/maturano/strapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maturano/strapi/statuses/{sha}","languages_url":"https://api.github.com/repos/maturano/strapi/languages","stargazers_url":"https://api.github.com/repos/maturano/strapi/stargazers","contributors_url":"https://api.github.com/repos/maturano/strapi/contributors","subscribers_url":"https://api.github.com/repos/maturano/strapi/subscribers","subscription_url":"https://api.github.com/repos/maturano/strapi/subscription","commits_url":"https://api.github.com/repos/maturano/strapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/maturano/strapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/maturano/strapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/maturano/strapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/maturano/strapi/contents/{+path}","compare_url":"https://api.github.com/repos/maturano/strapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maturano/strapi/merges","archive_url":"https://api.github.com/repos/maturano/strapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maturano/strapi/downloads","issues_url":"https://api.github.com/repos/maturano/strapi/issues{/number}","pulls_url":"https://api.github.com/repos/maturano/strapi/pulls{/number}","milestones_url":"https://api.github.com/repos/maturano/strapi/milestones{/number}","notifications_url":"https://api.github.com/repos/maturano/strapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maturano/strapi/labels{/name}","releases_url":"https://api.github.com/repos/maturano/strapi/releases{/id}","deployments_url":"https://api.github.com/repos/maturano/strapi/deployments","created_at":"2018-06-15T22:10:29Z","updated_at":"2018-08-06T17:39:06Z","pushed_at":"2018-08-09T15:37:54Z","git_url":"git://github.com/maturano/strapi.git","ssh_url":"git@github.com:maturano/strapi.git","clone_url":"https://github.com/maturano/strapi.git","svn_url":"https://github.com/maturano/strapi","homepage":"https://strapi.io","size":36893,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"strapi:master","ref":"master","sha":"eada18a619ff7fa57ea86b72d96f4842c7b11e4b","user":{"login":"strapi","id":19872173,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5ODcyMTcz","avatar_url":"https://avatars2.githubusercontent.com/u/19872173?v=4","gravatar_id":"","url":"https://api.github.com/users/strapi","html_url":"https://github.com/strapi","followers_url":"https://api.github.com/users/strapi/followers","following_url":"https://api.github.com/users/strapi/following{/other_user}","gists_url":"https://api.github.com/users/strapi/gists{/gist_id}","starred_url":"https://api.github.com/users/strapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strapi/subscriptions","organizations_url":"https://api.github.com/users/strapi/orgs","repos_url":"https://api.github.com/users/strapi/repos","events_url":"https://api.github.com/users/strapi/events{/privacy}","received_events_url":"https://api.github.com/users/strapi/received_events","type":"Organization","site_admin":false},"repo":{"id":43441403,"node_id":"MDEwOlJlcG9zaXRvcnk0MzQ0MTQwMw==","name":"strapi","full_name":"strapi/strapi","owner":{"login":"strapi","id":19872173,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5ODcyMTcz","avatar_url":"https://avatars2.githubusercontent.com/u/19872173?v=4","gravatar_id":"","url":"https://api.github.com/users/strapi","html_url":"https://github.com/strapi","followers_url":"https://api.github.com/users/strapi/followers","following_url":"https://api.github.com/users/strapi/following{/other_user}","gists_url":"https://api.github.com/users/strapi/gists{/gist_id}","starred_url":"https://api.github.com/users/strapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strapi/subscriptions","organizations_url":"https://api.github.com/users/strapi/orgs","repos_url":"https://api.github.com/users/strapi/repos","events_url":"https://api.github.com/users/strapi/events{/privacy}","received_events_url":"https://api.github.com/users/strapi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strapi/strapi","description":":rocket: Node.js Content Management Framework (headless-CMS) to build powerful API with no effort.","fork":false,"url":"https://api.github.com/repos/strapi/strapi","forks_url":"https://api.github.com/repos/strapi/strapi/forks","keys_url":"https://api.github.com/repos/strapi/strapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strapi/strapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strapi/strapi/teams","hooks_url":"https://api.github.com/repos/strapi/strapi/hooks","issue_events_url":"https://api.github.com/repos/strapi/strapi/issues/events{/number}","events_url":"https://api.github.com/repos/strapi/strapi/events","assignees_url":"https://api.github.com/repos/strapi/strapi/assignees{/user}","branches_url":"https://api.github.com/repos/strapi/strapi/branches{/branch}","tags_url":"https://api.github.com/repos/strapi/strapi/tags","blobs_url":"https://api.github.com/repos/strapi/strapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strapi/strapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strapi/strapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/strapi/strapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strapi/strapi/statuses/{sha}","languages_url":"https://api.github.com/repos/strapi/strapi/languages","stargazers_url":"https://api.github.com/repos/strapi/strapi/stargazers","contributors_url":"https://api.github.com/repos/strapi/strapi/contributors","subscribers_url":"https://api.github.com/repos/strapi/strapi/subscribers","subscription_url":"https://api.github.com/repos/strapi/strapi/subscription","commits_url":"https://api.github.com/repos/strapi/strapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/strapi/strapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/strapi/strapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/strapi/strapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/strapi/strapi/contents/{+path}","compare_url":"https://api.github.com/repos/strapi/strapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strapi/strapi/merges","archive_url":"https://api.github.com/repos/strapi/strapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strapi/strapi/downloads","issues_url":"https://api.github.com/repos/strapi/strapi/issues{/number}","pulls_url":"https://api.github.com/repos/strapi/strapi/pulls{/number}","milestones_url":"https://api.github.com/repos/strapi/strapi/milestones{/number}","notifications_url":"https://api.github.com/repos/strapi/strapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strapi/strapi/labels{/name}","releases_url":"https://api.github.com/repos/strapi/strapi/releases{/id}","deployments_url":"https://api.github.com/repos/strapi/strapi/deployments","created_at":"2015-09-30T15:34:48Z","updated_at":"2018-08-09T15:10:17Z","pushed_at":"2018-08-09T15:52:41Z","git_url":"git://github.com/strapi/strapi.git","ssh_url":"git@github.com:strapi/strapi.git","clone_url":"https://github.com/strapi/strapi.git","svn_url":"https://github.com/strapi/strapi","homepage":"https://strapi.io","size":41457,"stargazers_count":6656,"watchers_count":6656,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":699,"mirror_url":null,"archived":false,"open_issues_count":176,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":699,"open_issues":176,"watchers":6656,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strapi/strapi/pulls/1667"},"html":{"href":"https://github.com/strapi/strapi/pull/1667"},"issue":{"href":"https://api.github.com/repos/strapi/strapi/issues/1667"},"comments":{"href":"https://api.github.com/repos/strapi/strapi/issues/1667/comments"},"review_comments":{"href":"https://api.github.com/repos/strapi/strapi/pulls/1667/comments"},"review_comment":{"href":"https://api.github.com/repos/strapi/strapi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strapi/strapi/pulls/1667/commits"},"statuses":{"href":"https://api.github.com/repos/strapi/strapi/statuses/3853e7845225e96ffa4fa287ab1523035b55aaec"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"lauriejim","id":5716596,"node_id":"MDQ6VXNlcjU3MTY1OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/5716596?v=4","gravatar_id":"","url":"https://api.github.com/users/lauriejim","html_url":"https://github.com/lauriejim","followers_url":"https://api.github.com/users/lauriejim/followers","following_url":"https://api.github.com/users/lauriejim/following{/other_user}","gists_url":"https://api.github.com/users/lauriejim/gists{/gist_id}","starred_url":"https://api.github.com/users/lauriejim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauriejim/subscriptions","organizations_url":"https://api.github.com/users/lauriejim/orgs","repos_url":"https://api.github.com/users/lauriejim/repos","events_url":"https://api.github.com/users/lauriejim/events{/privacy}","received_events_url":"https://api.github.com/users/lauriejim/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":37,"deletions":27,"changed_files":4}}
{"actor":{"display_login":"lauriejim"}}