{"action":"created","comment":{"url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments/236046612","pull_request_review_id":178054970,"id":236046612,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjA0NjYxMg==","diff_hunk":"@@ -156,7 +156,17 @@ defmodule Phoenix.Router.Helpers do\n       Generates url to a static asset given its file path.\n       \"\"\"\n       def static_url(%Conn{private: private} = conn, path) do\n-        static_url(private.phoenix_endpoint, path)\n+        case private do\n+          %{phoenix_static_url: %URI{} = uri} ->\n+            %URI{uri | path: static_path(conn, path)}","path":"lib/phoenix/router/helpers.ex","position":7,"original_position":7,"commit_id":"556a7c1540951b0b45624064c3b1e4f992e1019d","original_commit_id":"556a7c1540951b0b45624064c3b1e4f992e1019d","user":{"login":"rmoorman","id":219695,"node_id":"MDQ6VXNlcjIxOTY5NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/219695?v=4","gravatar_id":"","url":"https://api.github.com/users/rmoorman","html_url":"https://github.com/rmoorman","followers_url":"https://api.github.com/users/rmoorman/followers","following_url":"https://api.github.com/users/rmoorman/following{/other_user}","gists_url":"https://api.github.com/users/rmoorman/gists{/gist_id}","starred_url":"https://api.github.com/users/rmoorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmoorman/subscriptions","organizations_url":"https://api.github.com/users/rmoorman/orgs","repos_url":"https://api.github.com/users/rmoorman/repos","events_url":"https://api.github.com/users/rmoorman/events{/privacy}","received_events_url":"https://api.github.com/users/rmoorman/received_events","type":"User","site_admin":false},"body":"@chrismccord when I would like to introduce this change, would you rather have the return value of `static_path/2` override the path from the given override `URI` struct or would you prefer that the path in the struct is prepended to the return value of `static_path/2`?","created_at":"2018-11-24T16:11:02Z","updated_at":"2018-11-24T16:11:02Z","html_url":"https://github.com/phoenixframework/phoenix/pull/3181#discussion_r236046612","pull_request_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/3181","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments/236046612"},"html":{"href":"https://github.com/phoenixframework/phoenix/pull/3181#discussion_r236046612"},"pull_request":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/3181"}}},"pull_request":{"url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/3181","id":233286344,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzMjg2MzQ0","html_url":"https://github.com/phoenixframework/phoenix/pull/3181","diff_url":"https://github.com/phoenixframework/phoenix/pull/3181.diff","patch_url":"https://github.com/phoenixframework/phoenix/pull/3181.patch","issue_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/3181","number":3181,"state":"open","locked":false,"title":"Introduce `put_static_url` for more dynamic static url generation","user":{"login":"rmoorman","id":219695,"node_id":"MDQ6VXNlcjIxOTY5NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/219695?v=4","gravatar_id":"","url":"https://api.github.com/users/rmoorman","html_url":"https://github.com/rmoorman","followers_url":"https://api.github.com/users/rmoorman/followers","following_url":"https://api.github.com/users/rmoorman/following{/other_user}","gists_url":"https://api.github.com/users/rmoorman/gists{/gist_id}","starred_url":"https://api.github.com/users/rmoorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmoorman/subscriptions","organizations_url":"https://api.github.com/users/rmoorman/orgs","repos_url":"https://api.github.com/users/rmoorman/repos","events_url":"https://api.github.com/users/rmoorman/events{/privacy}","received_events_url":"https://api.github.com/users/rmoorman/received_events","type":"User","site_admin":false},"body":"Similar to the `Phoenix.Controller.put_router_url/1` introduced in 1.4, this PR introduces a `Phoenix.Controller.put_static_url/1` function that allows to set the information used to generate the static url within the route helpers more dynamically.","created_at":"2018-11-23T22:34:53Z","updated_at":"2018-11-24T16:11:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c190061af5ace2e7ff333161ab0a8f21a7c31c4a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/3181/commits","review_comments_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/3181/comments","review_comment_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/3181/comments","statuses_url":"https://api.github.com/repos/phoenixframework/phoenix/statuses/556a7c1540951b0b45624064c3b1e4f992e1019d","head":{"label":"rmoorman:feature/configurable-static-url","ref":"feature/configurable-static-url","sha":"556a7c1540951b0b45624064c3b1e4f992e1019d","user":{"login":"rmoorman","id":219695,"node_id":"MDQ6VXNlcjIxOTY5NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/219695?v=4","gravatar_id":"","url":"https://api.github.com/users/rmoorman","html_url":"https://github.com/rmoorman","followers_url":"https://api.github.com/users/rmoorman/followers","following_url":"https://api.github.com/users/rmoorman/following{/other_user}","gists_url":"https://api.github.com/users/rmoorman/gists{/gist_id}","starred_url":"https://api.github.com/users/rmoorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmoorman/subscriptions","organizations_url":"https://api.github.com/users/rmoorman/orgs","repos_url":"https://api.github.com/users/rmoorman/repos","events_url":"https://api.github.com/users/rmoorman/events{/privacy}","received_events_url":"https://api.github.com/users/rmoorman/received_events","type":"User","site_admin":false},"repo":{"id":139770868,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk3NzA4Njg=","name":"phoenix","full_name":"rmoorman/phoenix","private":false,"owner":{"login":"rmoorman","id":219695,"node_id":"MDQ6VXNlcjIxOTY5NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/219695?v=4","gravatar_id":"","url":"https://api.github.com/users/rmoorman","html_url":"https://github.com/rmoorman","followers_url":"https://api.github.com/users/rmoorman/followers","following_url":"https://api.github.com/users/rmoorman/following{/other_user}","gists_url":"https://api.github.com/users/rmoorman/gists{/gist_id}","starred_url":"https://api.github.com/users/rmoorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmoorman/subscriptions","organizations_url":"https://api.github.com/users/rmoorman/orgs","repos_url":"https://api.github.com/users/rmoorman/repos","events_url":"https://api.github.com/users/rmoorman/events{/privacy}","received_events_url":"https://api.github.com/users/rmoorman/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rmoorman/phoenix","description":"Productive. Reliable. Fast.","fork":true,"url":"https://api.github.com/repos/rmoorman/phoenix","forks_url":"https://api.github.com/repos/rmoorman/phoenix/forks","keys_url":"https://api.github.com/repos/rmoorman/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rmoorman/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rmoorman/phoenix/teams","hooks_url":"https://api.github.com/repos/rmoorman/phoenix/hooks","issue_events_url":"https://api.github.com/repos/rmoorman/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/rmoorman/phoenix/events","assignees_url":"https://api.github.com/repos/rmoorman/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/rmoorman/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/rmoorman/phoenix/tags","blobs_url":"https://api.github.com/repos/rmoorman/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rmoorman/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rmoorman/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/rmoorman/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rmoorman/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/rmoorman/phoenix/languages","stargazers_url":"https://api.github.com/repos/rmoorman/phoenix/stargazers","contributors_url":"https://api.github.com/repos/rmoorman/phoenix/contributors","subscribers_url":"https://api.github.com/repos/rmoorman/phoenix/subscribers","subscription_url":"https://api.github.com/repos/rmoorman/phoenix/subscription","commits_url":"https://api.github.com/repos/rmoorman/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/rmoorman/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/rmoorman/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/rmoorman/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/rmoorman/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/rmoorman/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rmoorman/phoenix/merges","archive_url":"https://api.github.com/repos/rmoorman/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rmoorman/phoenix/downloads","issues_url":"https://api.github.com/repos/rmoorman/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/rmoorman/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/rmoorman/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/rmoorman/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rmoorman/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/rmoorman/phoenix/releases{/id}","deployments_url":"https://api.github.com/repos/rmoorman/phoenix/deployments","created_at":"2018-07-04T22:32:45Z","updated_at":"2018-11-23T21:06:15Z","pushed_at":"2018-11-23T22:17:54Z","git_url":"git://github.com/rmoorman/phoenix.git","ssh_url":"git@github.com:rmoorman/phoenix.git","clone_url":"https://github.com/rmoorman/phoenix.git","svn_url":"https://github.com/rmoorman/phoenix","homepage":"http://www.phoenixframework.org","size":10369,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"phoenixframework:master","ref":"master","sha":"60fce56798cf074a784988ebedb97d17247e5d68","user":{"login":"phoenixframework","id":6510388,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1MTAzODg=","avatar_url":"https://avatars2.githubusercontent.com/u/6510388?v=4","gravatar_id":"","url":"https://api.github.com/users/phoenixframework","html_url":"https://github.com/phoenixframework","followers_url":"https://api.github.com/users/phoenixframework/followers","following_url":"https://api.github.com/users/phoenixframework/following{/other_user}","gists_url":"https://api.github.com/users/phoenixframework/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixframework/subscriptions","organizations_url":"https://api.github.com/users/phoenixframework/orgs","repos_url":"https://api.github.com/users/phoenixframework/repos","events_url":"https://api.github.com/users/phoenixframework/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixframework/received_events","type":"Organization","site_admin":false},"repo":{"id":16072585,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA3MjU4NQ==","name":"phoenix","full_name":"phoenixframework/phoenix","private":false,"owner":{"login":"phoenixframework","id":6510388,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1MTAzODg=","avatar_url":"https://avatars2.githubusercontent.com/u/6510388?v=4","gravatar_id":"","url":"https://api.github.com/users/phoenixframework","html_url":"https://github.com/phoenixframework","followers_url":"https://api.github.com/users/phoenixframework/followers","following_url":"https://api.github.com/users/phoenixframework/following{/other_user}","gists_url":"https://api.github.com/users/phoenixframework/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixframework/subscriptions","organizations_url":"https://api.github.com/users/phoenixframework/orgs","repos_url":"https://api.github.com/users/phoenixframework/repos","events_url":"https://api.github.com/users/phoenixframework/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixframework/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/phoenixframework/phoenix","description":"Productive. Reliable. Fast.","fork":false,"url":"https://api.github.com/repos/phoenixframework/phoenix","forks_url":"https://api.github.com/repos/phoenixframework/phoenix/forks","keys_url":"https://api.github.com/repos/phoenixframework/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phoenixframework/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phoenixframework/phoenix/teams","hooks_url":"https://api.github.com/repos/phoenixframework/phoenix/hooks","issue_events_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/phoenixframework/phoenix/events","assignees_url":"https://api.github.com/repos/phoenixframework/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/phoenixframework/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/phoenixframework/phoenix/tags","blobs_url":"https://api.github.com/repos/phoenixframework/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phoenixframework/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phoenixframework/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/phoenixframework/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phoenixframework/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/phoenixframework/phoenix/languages","stargazers_url":"https://api.github.com/repos/phoenixframework/phoenix/stargazers","contributors_url":"https://api.github.com/repos/phoenixframework/phoenix/contributors","subscribers_url":"https://api.github.com/repos/phoenixframework/phoenix/subscribers","subscription_url":"https://api.github.com/repos/phoenixframework/phoenix/subscription","commits_url":"https://api.github.com/repos/phoenixframework/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/phoenixframework/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/phoenixframework/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/phoenixframework/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phoenixframework/phoenix/merges","archive_url":"https://api.github.com/repos/phoenixframework/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phoenixframework/phoenix/downloads","issues_url":"https://api.github.com/repos/phoenixframework/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/phoenixframework/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/phoenixframework/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phoenixframework/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/phoenixframework/phoenix/releases{/id}","deployments_url":"https://api.github.com/repos/phoenixframework/phoenix/deployments","created_at":"2014-01-20T14:14:11Z","updated_at":"2018-11-24T11:37:37Z","pushed_at":"2018-11-23T22:34:53Z","git_url":"git://github.com/phoenixframework/phoenix.git","ssh_url":"git@github.com:phoenixframework/phoenix.git","clone_url":"https://github.com/phoenixframework/phoenix.git","svn_url":"https://github.com/phoenixframework/phoenix","homepage":"http://www.phoenixframework.org","size":10417,"stargazers_count":12855,"watchers_count":12855,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1602,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1602,"open_issues":17,"watchers":12855,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/3181"},"html":{"href":"https://github.com/phoenixframework/phoenix/pull/3181"},"issue":{"href":"https://api.github.com/repos/phoenixframework/phoenix/issues/3181"},"comments":{"href":"https://api.github.com/repos/phoenixframework/phoenix/issues/3181/comments"},"review_comments":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/3181/comments"},"review_comment":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/3181/commits"},"statuses":{"href":"https://api.github.com/repos/phoenixframework/phoenix/statuses/556a7c1540951b0b45624064c3b1e4f992e1019d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rmoorman"}}