{"action":"created","comment":{"url":"https://api.github.com/repos/badges/shields/pulls/comments/177603890","pull_request_review_id":107504466,"id":177603890,"diff_hunk":"@@ -7,11 +7,13 @@\n const moment = require('moment');\n \n function version(version) {\n-  let first = version[0];\n+  // The passed in version may or may not already be a string. See #1599.\n+  const stringifiedVersion = '' + version;","path":"lib/color-formatters.js","position":null,"original_position":6,"commit_id":"aa9ba33f8482e4fc6d5bf9cfb6908654ce4af1b6","original_commit_id":"efa50ace904d19287e2f0734c5cc936abcff16e9","user":{"login":"paulmelnikow","id":1487036,"avatar_url":"https://avatars2.githubusercontent.com/u/1487036?v=4","gravatar_id":"","url":"https://api.github.com/users/paulmelnikow","html_url":"https://github.com/paulmelnikow","followers_url":"https://api.github.com/users/paulmelnikow/followers","following_url":"https://api.github.com/users/paulmelnikow/following{/other_user}","gists_url":"https://api.github.com/users/paulmelnikow/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmelnikow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmelnikow/subscriptions","organizations_url":"https://api.github.com/users/paulmelnikow/orgs","repos_url":"https://api.github.com/users/paulmelnikow/repos","events_url":"https://api.github.com/users/paulmelnikow/events{/privacy}","received_events_url":"https://api.github.com/users/paulmelnikow/received_events","type":"User","site_admin":false},"body":"Yea… it's a matter of style. The language treats them as `let` variables, though if you want you can tell eslint not to let you reassign them. The advantage of reassigning them is that it prevents you from accidentally using the unmodified value, and I think reassigning them once at the top of the function is not so confusing. Though I could be convinced otherwise. 😁 ","created_at":"2018-03-27T23:40:13Z","updated_at":"2018-03-27T23:40:13Z","html_url":"https://github.com/badges/shields/pull/1615#discussion_r177603890","pull_request_url":"https://api.github.com/repos/badges/shields/pulls/1615","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/badges/shields/pulls/comments/177603890"},"html":{"href":"https://github.com/badges/shields/pull/1615#discussion_r177603890"},"pull_request":{"href":"https://api.github.com/repos/badges/shields/pulls/1615"}},"in_reply_to_id":177559741},"pull_request":{"url":"https://api.github.com/repos/badges/shields/pulls/1615","id":177832346,"html_url":"https://github.com/badges/shields/pull/1615","diff_url":"https://github.com/badges/shields/pull/1615.diff","patch_url":"https://github.com/badges/shields/pull/1615.patch","issue_url":"https://api.github.com/repos/badges/shields/issues/1615","number":1615,"state":"open","locked":false,"title":"Number support to version color formatter","user":{"login":"PyvesB","id":10694593,"avatar_url":"https://avatars2.githubusercontent.com/u/10694593?v=4","gravatar_id":"","url":"https://api.github.com/users/PyvesB","html_url":"https://github.com/PyvesB","followers_url":"https://api.github.com/users/PyvesB/followers","following_url":"https://api.github.com/users/PyvesB/following{/other_user}","gists_url":"https://api.github.com/users/PyvesB/gists{/gist_id}","starred_url":"https://api.github.com/users/PyvesB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyvesB/subscriptions","organizations_url":"https://api.github.com/users/PyvesB/orgs","repos_url":"https://api.github.com/users/PyvesB/repos","events_url":"https://api.github.com/users/PyvesB/events{/privacy}","received_events_url":"https://api.github.com/users/PyvesB/received_events","type":"User","site_admin":false},"body":"This pull request is related to discussions in #1599.\r\n\r\nTests to cover cases where the version is provided as a numerical value were added. I thought of several different ways of tackling the implementation and went with one, but a more experienced Javascript reviewer may have some better ideas. 👍 ","created_at":"2018-03-27T18:52:04Z","updated_at":"2018-03-27T23:40:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75f921b67c3db789c0092103f86b95b21cc6527a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/badges/shields/pulls/1615/commits","review_comments_url":"https://api.github.com/repos/badges/shields/pulls/1615/comments","review_comment_url":"https://api.github.com/repos/badges/shields/pulls/comments{/number}","comments_url":"https://api.github.com/repos/badges/shields/issues/1615/comments","statuses_url":"https://api.github.com/repos/badges/shields/statuses/aa9ba33f8482e4fc6d5bf9cfb6908654ce4af1b6","head":{"label":"PyvesB:color-number-handling","ref":"color-number-handling","sha":"aa9ba33f8482e4fc6d5bf9cfb6908654ce4af1b6","user":{"login":"PyvesB","id":10694593,"avatar_url":"https://avatars2.githubusercontent.com/u/10694593?v=4","gravatar_id":"","url":"https://api.github.com/users/PyvesB","html_url":"https://github.com/PyvesB","followers_url":"https://api.github.com/users/PyvesB/followers","following_url":"https://api.github.com/users/PyvesB/following{/other_user}","gists_url":"https://api.github.com/users/PyvesB/gists{/gist_id}","starred_url":"https://api.github.com/users/PyvesB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyvesB/subscriptions","organizations_url":"https://api.github.com/users/PyvesB/orgs","repos_url":"https://api.github.com/users/PyvesB/repos","events_url":"https://api.github.com/users/PyvesB/events{/privacy}","received_events_url":"https://api.github.com/users/PyvesB/received_events","type":"User","site_admin":false},"repo":{"id":106314741,"name":"shields","full_name":"PyvesB/shields","owner":{"login":"PyvesB","id":10694593,"avatar_url":"https://avatars2.githubusercontent.com/u/10694593?v=4","gravatar_id":"","url":"https://api.github.com/users/PyvesB","html_url":"https://github.com/PyvesB","followers_url":"https://api.github.com/users/PyvesB/followers","following_url":"https://api.github.com/users/PyvesB/following{/other_user}","gists_url":"https://api.github.com/users/PyvesB/gists{/gist_id}","starred_url":"https://api.github.com/users/PyvesB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyvesB/subscriptions","organizations_url":"https://api.github.com/users/PyvesB/orgs","repos_url":"https://api.github.com/users/PyvesB/repos","events_url":"https://api.github.com/users/PyvesB/events{/privacy}","received_events_url":"https://api.github.com/users/PyvesB/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PyvesB/shields","description":"Shields badge specification, website and default API server","fork":true,"url":"https://api.github.com/repos/PyvesB/shields","forks_url":"https://api.github.com/repos/PyvesB/shields/forks","keys_url":"https://api.github.com/repos/PyvesB/shields/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PyvesB/shields/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PyvesB/shields/teams","hooks_url":"https://api.github.com/repos/PyvesB/shields/hooks","issue_events_url":"https://api.github.com/repos/PyvesB/shields/issues/events{/number}","events_url":"https://api.github.com/repos/PyvesB/shields/events","assignees_url":"https://api.github.com/repos/PyvesB/shields/assignees{/user}","branches_url":"https://api.github.com/repos/PyvesB/shields/branches{/branch}","tags_url":"https://api.github.com/repos/PyvesB/shields/tags","blobs_url":"https://api.github.com/repos/PyvesB/shields/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PyvesB/shields/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PyvesB/shields/git/refs{/sha}","trees_url":"https://api.github.com/repos/PyvesB/shields/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PyvesB/shields/statuses/{sha}","languages_url":"https://api.github.com/repos/PyvesB/shields/languages","stargazers_url":"https://api.github.com/repos/PyvesB/shields/stargazers","contributors_url":"https://api.github.com/repos/PyvesB/shields/contributors","subscribers_url":"https://api.github.com/repos/PyvesB/shields/subscribers","subscription_url":"https://api.github.com/repos/PyvesB/shields/subscription","commits_url":"https://api.github.com/repos/PyvesB/shields/commits{/sha}","git_commits_url":"https://api.github.com/repos/PyvesB/shields/git/commits{/sha}","comments_url":"https://api.github.com/repos/PyvesB/shields/comments{/number}","issue_comment_url":"https://api.github.com/repos/PyvesB/shields/issues/comments{/number}","contents_url":"https://api.github.com/repos/PyvesB/shields/contents/{+path}","compare_url":"https://api.github.com/repos/PyvesB/shields/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PyvesB/shields/merges","archive_url":"https://api.github.com/repos/PyvesB/shields/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PyvesB/shields/downloads","issues_url":"https://api.github.com/repos/PyvesB/shields/issues{/number}","pulls_url":"https://api.github.com/repos/PyvesB/shields/pulls{/number}","milestones_url":"https://api.github.com/repos/PyvesB/shields/milestones{/number}","notifications_url":"https://api.github.com/repos/PyvesB/shields/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PyvesB/shields/labels{/name}","releases_url":"https://api.github.com/repos/PyvesB/shields/releases{/id}","deployments_url":"https://api.github.com/repos/PyvesB/shields/deployments","created_at":"2017-10-09T17:37:08Z","updated_at":"2018-03-27T17:51:53Z","pushed_at":"2018-03-27T21:46:54Z","git_url":"git://github.com/PyvesB/shields.git","ssh_url":"git@github.com:PyvesB/shields.git","clone_url":"https://github.com/PyvesB/shields.git","svn_url":"https://github.com/PyvesB/shields","homepage":"https://shields.io","size":6859,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"badges:master","ref":"master","sha":"ed419b0a77d89094e11466797dfae68d92a2fab9","user":{"login":"badges","id":6254238,"avatar_url":"https://avatars2.githubusercontent.com/u/6254238?v=4","gravatar_id":"","url":"https://api.github.com/users/badges","html_url":"https://github.com/badges","followers_url":"https://api.github.com/users/badges/followers","following_url":"https://api.github.com/users/badges/following{/other_user}","gists_url":"https://api.github.com/users/badges/gists{/gist_id}","starred_url":"https://api.github.com/users/badges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/badges/subscriptions","organizations_url":"https://api.github.com/users/badges/orgs","repos_url":"https://api.github.com/users/badges/repos","events_url":"https://api.github.com/users/badges/events{/privacy}","received_events_url":"https://api.github.com/users/badges/received_events","type":"Organization","site_admin":false},"repo":{"id":7910045,"name":"shields","full_name":"badges/shields","owner":{"login":"badges","id":6254238,"avatar_url":"https://avatars2.githubusercontent.com/u/6254238?v=4","gravatar_id":"","url":"https://api.github.com/users/badges","html_url":"https://github.com/badges","followers_url":"https://api.github.com/users/badges/followers","following_url":"https://api.github.com/users/badges/following{/other_user}","gists_url":"https://api.github.com/users/badges/gists{/gist_id}","starred_url":"https://api.github.com/users/badges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/badges/subscriptions","organizations_url":"https://api.github.com/users/badges/orgs","repos_url":"https://api.github.com/users/badges/repos","events_url":"https://api.github.com/users/badges/events{/privacy}","received_events_url":"https://api.github.com/users/badges/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/badges/shields","description":"Concise, consistent, and legible badges in SVG and raster format","fork":false,"url":"https://api.github.com/repos/badges/shields","forks_url":"https://api.github.com/repos/badges/shields/forks","keys_url":"https://api.github.com/repos/badges/shields/keys{/key_id}","collaborators_url":"https://api.github.com/repos/badges/shields/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/badges/shields/teams","hooks_url":"https://api.github.com/repos/badges/shields/hooks","issue_events_url":"https://api.github.com/repos/badges/shields/issues/events{/number}","events_url":"https://api.github.com/repos/badges/shields/events","assignees_url":"https://api.github.com/repos/badges/shields/assignees{/user}","branches_url":"https://api.github.com/repos/badges/shields/branches{/branch}","tags_url":"https://api.github.com/repos/badges/shields/tags","blobs_url":"https://api.github.com/repos/badges/shields/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/badges/shields/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/badges/shields/git/refs{/sha}","trees_url":"https://api.github.com/repos/badges/shields/git/trees{/sha}","statuses_url":"https://api.github.com/repos/badges/shields/statuses/{sha}","languages_url":"https://api.github.com/repos/badges/shields/languages","stargazers_url":"https://api.github.com/repos/badges/shields/stargazers","contributors_url":"https://api.github.com/repos/badges/shields/contributors","subscribers_url":"https://api.github.com/repos/badges/shields/subscribers","subscription_url":"https://api.github.com/repos/badges/shields/subscription","commits_url":"https://api.github.com/repos/badges/shields/commits{/sha}","git_commits_url":"https://api.github.com/repos/badges/shields/git/commits{/sha}","comments_url":"https://api.github.com/repos/badges/shields/comments{/number}","issue_comment_url":"https://api.github.com/repos/badges/shields/issues/comments{/number}","contents_url":"https://api.github.com/repos/badges/shields/contents/{+path}","compare_url":"https://api.github.com/repos/badges/shields/compare/{base}...{head}","merges_url":"https://api.github.com/repos/badges/shields/merges","archive_url":"https://api.github.com/repos/badges/shields/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/badges/shields/downloads","issues_url":"https://api.github.com/repos/badges/shields/issues{/number}","pulls_url":"https://api.github.com/repos/badges/shields/pulls{/number}","milestones_url":"https://api.github.com/repos/badges/shields/milestones{/number}","notifications_url":"https://api.github.com/repos/badges/shields/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/badges/shields/labels{/name}","releases_url":"https://api.github.com/repos/badges/shields/releases{/id}","deployments_url":"https://api.github.com/repos/badges/shields/deployments","created_at":"2013-01-30T07:41:54Z","updated_at":"2018-03-27T21:23:47Z","pushed_at":"2018-03-27T23:35:09Z","git_url":"git://github.com/badges/shields.git","ssh_url":"git@github.com:badges/shields.git","clone_url":"https://github.com/badges/shields.git","svn_url":"https://github.com/badges/shields","homepage":"https://shields.io","size":6818,"stargazers_count":5295,"watchers_count":5295,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1172,"mirror_url":null,"archived":false,"open_issues_count":174,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1172,"open_issues":174,"watchers":5295,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/badges/shields/pulls/1615"},"html":{"href":"https://github.com/badges/shields/pull/1615"},"issue":{"href":"https://api.github.com/repos/badges/shields/issues/1615"},"comments":{"href":"https://api.github.com/repos/badges/shields/issues/1615/comments"},"review_comments":{"href":"https://api.github.com/repos/badges/shields/pulls/1615/comments"},"review_comment":{"href":"https://api.github.com/repos/badges/shields/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/badges/shields/pulls/1615/commits"},"statuses":{"href":"https://api.github.com/repos/badges/shields/statuses/aa9ba33f8482e4fc6d5bf9cfb6908654ce4af1b6"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"paulmelnikow"}}