{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular.js/pulls/comments/173093895","pull_request_review_id":102222300,"id":173093895,"diff_hunk":"@@ -43,6 +52,115 @@ function shallowClearAndCopy(src, dst) {\n   return dst;\n }\n \n+function parseTemplateParams(template) {\n+  var urlParams = Object.create(null);\n+  forEach(template.split(/\\W/), function(segment) {\n+    if (segment === 'hasOwnProperty') {\n+      throw $resourceMinErr('badname', 'hasOwnProperty is not a valid parameter name.');\n+    }\n+    // ignore segments that look like port numbers (e.g. `:8080`)\n+    if (segment && !ONLY_DIGITS_REGEX.test(segment) && containsParam(template, segment)) {\n+      // does this param appear in the query part of the URL?\n+      var isQueryParamValue = (new RegExp('\\\\?.*=:' + segment + '(?:\\\\W|$)')).test(template);\n+      urlParams[segment] = { isQueryParamValue: isQueryParamValue };\n+    }\n+  });\n+  return urlParams;\n+}\n+\n+var $composeResourceUrlFactory = ['$httpParamSerializer', function($httpParamSerializer) {","path":"src/ngResource/resource.js","position":36,"original_position":36,"commit_id":"c52ed3542c580f02356ddaa6f52a9719857124a1","original_commit_id":"c52ed3542c580f02356ddaa6f52a9719857124a1","user":{"login":"gkalpak","id":8604205,"avatar_url":"https://avatars2.githubusercontent.com/u/8604205?v=4","gravatar_id":"","url":"https://api.github.com/users/gkalpak","html_url":"https://github.com/gkalpak","followers_url":"https://api.github.com/users/gkalpak/followers","following_url":"https://api.github.com/users/gkalpak/following{/other_user}","gists_url":"https://api.github.com/users/gkalpak/gists{/gist_id}","starred_url":"https://api.github.com/users/gkalpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkalpak/subscriptions","organizations_url":"https://api.github.com/users/gkalpak/orgs","repos_url":"https://api.github.com/users/gkalpak/repos","events_url":"https://api.github.com/users/gkalpak/events{/privacy}","received_events_url":"https://api.github.com/users/gkalpak/received_events","type":"User","site_admin":false},"body":"I am fine with both options (except that if we go with the first one, we should also respect an action or resource specific paramSerializer).","created_at":"2018-03-08T08:44:03Z","updated_at":"2018-03-08T08:44:04Z","html_url":"https://github.com/angular/angular.js/pull/16479#discussion_r173093895","pull_request_url":"https://api.github.com/repos/angular/angular.js/pulls/16479","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments/173093895"},"html":{"href":"https://github.com/angular/angular.js/pull/16479#discussion_r173093895"},"pull_request":{"href":"https://api.github.com/repos/angular/angular.js/pulls/16479"}},"in_reply_to_id":173024072},"pull_request":{"url":"https://api.github.com/repos/angular/angular.js/pulls/16479","id":173534537,"html_url":"https://github.com/angular/angular.js/pull/16479","diff_url":"https://github.com/angular/angular.js/pull/16479.diff","patch_url":"https://github.com/angular/angular.js/pull/16479.patch","issue_url":"https://api.github.com/repos/angular/angular.js/issues/16479","number":16479,"state":"open","locked":false,"title":"feat($resource): add $composeResourceUrl service","user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars0.githubusercontent.com/u/15655?v=4","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"body":"I don't believe this contains a BC!\r\n\r\nThe docs look like:\r\n\r\n<img width=\"820\" alt=\"screen shot 2018-03-07 at 18 10 48\" src=\"https://user-images.githubusercontent.com/15655/37110355-9282ac6c-2234-11e8-86da-1b561a3b5575.png\">\r\n","created_at":"2018-03-07T18:22:14Z","updated_at":"2018-03-08T08:44:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fce25bc4839545820301ff56ff7fe00ae77e5150","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Narretz","id":1153097,"avatar_url":"https://avatars1.githubusercontent.com/u/1153097?v=4","gravatar_id":"","url":"https://api.github.com/users/Narretz","html_url":"https://github.com/Narretz","followers_url":"https://api.github.com/users/Narretz/followers","following_url":"https://api.github.com/users/Narretz/following{/other_user}","gists_url":"https://api.github.com/users/Narretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Narretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narretz/subscriptions","organizations_url":"https://api.github.com/users/Narretz/orgs","repos_url":"https://api.github.com/users/Narretz/repos","events_url":"https://api.github.com/users/Narretz/events{/privacy}","received_events_url":"https://api.github.com/users/Narretz/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":298782427,"url":"https://api.github.com/repos/angular/angular.js/labels/branch:%201.6.x","name":"branch: 1.6.x","color":"006b75","default":false},{"id":53200617,"url":"https://api.github.com/repos/angular/angular.js/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf","default":false},{"id":61607,"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20ngResource","name":"component: ngResource","color":"0b02e1","default":false},{"id":53079815,"url":"https://api.github.com/repos/angular/angular.js/labels/frequency:%20low","name":"frequency: low","color":"bfe5bf","default":false},{"id":70520756,"url":"https://api.github.com/repos/angular/angular.js/labels/needs:%20public%20api","name":"needs: public api","color":"eb6420","default":false},{"id":53337716,"url":"https://api.github.com/repos/angular/angular.js/labels/needs:%20review","name":"needs: review","color":"eb6420","default":false},{"id":83182371,"url":"https://api.github.com/repos/angular/angular.js/labels/severity:%20inconvenient","name":"severity: inconvenient","color":"006b75","default":false},{"id":48406,"url":"https://api.github.com/repos/angular/angular.js/labels/type:%20feature","name":"type: feature","color":"00a606","default":false}],"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/105","html_url":"https://github.com/angular/angular.js/milestone/105","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/105/labels","id":1317216,"number":105,"title":"1.6.x","description":"Stuff that we want to merge into the 1.6.x branch after we have released 1.6.0","creator":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars0.githubusercontent.com/u/15655?v=4","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":103,"state":"open","created_at":"2015-09-21T20:16:38Z","updated_at":"2018-03-07T18:22:14Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/angular/angular.js/pulls/16479/commits","review_comments_url":"https://api.github.com/repos/angular/angular.js/pulls/16479/comments","review_comment_url":"https://api.github.com/repos/angular/angular.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/16479/comments","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/c52ed3542c580f02356ddaa6f52a9719857124a1","head":{"label":"petebacondarwin:resource-composeResourceUrl","ref":"resource-composeResourceUrl","sha":"c52ed3542c580f02356ddaa6f52a9719857124a1","user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars0.githubusercontent.com/u/15655?v=4","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"repo":{"id":6367749,"name":"angular.js","full_name":"petebacondarwin/angular.js","owner":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars0.githubusercontent.com/u/15655?v=4","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petebacondarwin/angular.js","description":null,"fork":true,"url":"https://api.github.com/repos/petebacondarwin/angular.js","forks_url":"https://api.github.com/repos/petebacondarwin/angular.js/forks","keys_url":"https://api.github.com/repos/petebacondarwin/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petebacondarwin/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petebacondarwin/angular.js/teams","hooks_url":"https://api.github.com/repos/petebacondarwin/angular.js/hooks","issue_events_url":"https://api.github.com/repos/petebacondarwin/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/petebacondarwin/angular.js/events","assignees_url":"https://api.github.com/repos/petebacondarwin/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/petebacondarwin/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/petebacondarwin/angular.js/tags","blobs_url":"https://api.github.com/repos/petebacondarwin/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petebacondarwin/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petebacondarwin/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/petebacondarwin/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petebacondarwin/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/petebacondarwin/angular.js/languages","stargazers_url":"https://api.github.com/repos/petebacondarwin/angular.js/stargazers","contributors_url":"https://api.github.com/repos/petebacondarwin/angular.js/contributors","subscribers_url":"https://api.github.com/repos/petebacondarwin/angular.js/subscribers","subscription_url":"https://api.github.com/repos/petebacondarwin/angular.js/subscription","commits_url":"https://api.github.com/repos/petebacondarwin/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/petebacondarwin/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/petebacondarwin/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/petebacondarwin/angular.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/petebacondarwin/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/petebacondarwin/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petebacondarwin/angular.js/merges","archive_url":"https://api.github.com/repos/petebacondarwin/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petebacondarwin/angular.js/downloads","issues_url":"https://api.github.com/repos/petebacondarwin/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/petebacondarwin/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/petebacondarwin/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/petebacondarwin/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petebacondarwin/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/petebacondarwin/angular.js/releases{/id}","deployments_url":"https://api.github.com/repos/petebacondarwin/angular.js/deployments","created_at":"2012-10-24T09:47:23Z","updated_at":"2016-12-07T10:10:45Z","pushed_at":"2018-03-07T22:03:55Z","git_url":"git://github.com/petebacondarwin/angular.js.git","ssh_url":"git@github.com:petebacondarwin/angular.js.git","clone_url":"https://github.com/petebacondarwin/angular.js.git","svn_url":"https://github.com/petebacondarwin/angular.js","homepage":"http://angularjs.org","size":93528,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"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"},"forks":1,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"64c23e4d9c527da42c2de3c7b46fcaa378d2a4a0","user":{"login":"angular","id":139426,"avatar_url":"https://avatars3.githubusercontent.com/u/139426?v=4","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":460078,"name":"angular.js","full_name":"angular/angular.js","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars3.githubusercontent.com/u/139426?v=4","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular.js","description":"AngularJS - HTML enhanced for web apps!","fork":false,"url":"https://api.github.com/repos/angular/angular.js","forks_url":"https://api.github.com/repos/angular/angular.js/forks","keys_url":"https://api.github.com/repos/angular/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular.js/teams","hooks_url":"https://api.github.com/repos/angular/angular.js/hooks","issue_events_url":"https://api.github.com/repos/angular/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular.js/events","assignees_url":"https://api.github.com/repos/angular/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular.js/tags","blobs_url":"https://api.github.com/repos/angular/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular.js/languages","stargazers_url":"https://api.github.com/repos/angular/angular.js/stargazers","contributors_url":"https://api.github.com/repos/angular/angular.js/contributors","subscribers_url":"https://api.github.com/repos/angular/angular.js/subscribers","subscription_url":"https://api.github.com/repos/angular/angular.js/subscription","commits_url":"https://api.github.com/repos/angular/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular.js/merges","archive_url":"https://api.github.com/repos/angular/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular.js/downloads","issues_url":"https://api.github.com/repos/angular/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular.js/releases{/id}","deployments_url":"https://api.github.com/repos/angular/angular.js/deployments","created_at":"2010-01-06T00:34:37Z","updated_at":"2018-03-08T08:32:12Z","pushed_at":"2018-03-07T22:26:33Z","git_url":"git://github.com/angular/angular.js.git","ssh_url":"git@github.com:angular/angular.js.git","clone_url":"https://github.com/angular/angular.js.git","svn_url":"https://github.com/angular/angular.js","homepage":"https://angularjs.org","size":98272,"stargazers_count":58106,"watchers_count":58106,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28830,"mirror_url":null,"archived":false,"open_issues_count":635,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":28830,"open_issues":635,"watchers":58106,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/16479"},"html":{"href":"https://github.com/angular/angular.js/pull/16479"},"issue":{"href":"https://api.github.com/repos/angular/angular.js/issues/16479"},"comments":{"href":"https://api.github.com/repos/angular/angular.js/issues/16479/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular.js/pulls/16479/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular.js/pulls/16479/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular.js/statuses/c52ed3542c580f02356ddaa6f52a9719857124a1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"gkalpak"}}