{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/comments/104417129","pull_request_review_id":25252964,"id":104417129,"diff_hunk":"@@ -513,16 +513,26 @@ public boolean isNewerThan(VersionNumber rhs) {\n         return compareTo(rhs) > 0;\n     }\n \n+    /**\n+     * Returns a digit (numeric component) by its position. Once a non-numeric component is found all remaining components\n+     * are also considered non-numeric by this method.\n+     *\n+     * @param idx Digit position we want to retrieve starting by 1 (not zero).","path":"src/main/java/hudson/util/VersionNumber.java","position":8,"original_position":8,"commit_id":"6acabf980f2e6d2cbd56427894ae48644510e914","original_commit_id":"6acabf980f2e6d2cbd56427894ae48644510e914","user":{"login":"stephenc","id":209336,"avatar_url":"https://avatars1.githubusercontent.com/u/209336?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenc","html_url":"https://github.com/stephenc","followers_url":"https://api.github.com/users/stephenc/followers","following_url":"https://api.github.com/users/stephenc/following{/other_user}","gists_url":"https://api.github.com/users/stephenc/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenc/subscriptions","organizations_url":"https://api.github.com/users/stephenc/orgs","repos_url":"https://api.github.com/users/stephenc/repos","events_url":"https://api.github.com/users/stephenc/events{/privacy}","received_events_url":"https://api.github.com/users/stephenc/received_events","type":"User","site_admin":false},"body":"It was starting from zero before AIUI. I really think it would be safer to just deprecate this method and start with a new method where you can define the semantics you need. ","created_at":"2017-03-06T13:51:32Z","updated_at":"2017-03-06T13:51:38Z","html_url":"https://github.com/jenkinsci/lib-version-number/pull/3#discussion_r104417129","pull_request_url":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/comments/104417129"},"html":{"href":"https://github.com/jenkinsci/lib-version-number/pull/3#discussion_r104417129"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/3","id":109105356,"html_url":"https://github.com/jenkinsci/lib-version-number/pull/3","diff_url":"https://github.com/jenkinsci/lib-version-number/pull/3.diff","patch_url":"https://github.com/jenkinsci/lib-version-number/pull/3.patch","issue_url":"https://api.github.com/repos/jenkinsci/lib-version-number/issues/3","number":3,"state":"open","locked":false,"title":"VersionNumber.digit() does not work as expected","user":{"login":"recena","id":1021745,"avatar_url":"https://avatars0.githubusercontent.com/u/1021745?v=3","gravatar_id":"","url":"https://api.github.com/users/recena","html_url":"https://github.com/recena","followers_url":"https://api.github.com/users/recena/followers","following_url":"https://api.github.com/users/recena/following{/other_user}","gists_url":"https://api.github.com/users/recena/gists{/gist_id}","starred_url":"https://api.github.com/users/recena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/recena/subscriptions","organizations_url":"https://api.github.com/users/recena/orgs","repos_url":"https://api.github.com/users/recena/repos","events_url":"https://api.github.com/users/recena/events{/privacy}","received_events_url":"https://api.github.com/users/recena/received_events","type":"User","site_admin":false},"body":"The first time I used `VersionNumber.digit(int idx)` I expected retrieving the digit of the version number in the position set by `idx`. However, I always retrieved the first digit or `0` with something like `new VersionNumber(\"\");`.\r\n\r\nI tried to understand what this method does, but I did not find any logical behavior.\r\n\r\nThis PR provides some changes (and tests) in order to define (at least) a behavior documented and tested.\r\n\r\n@reviewbybees, specially @stephenc and @jglick ","created_at":"2017-03-04T12:01:13Z","updated_at":"2017-03-06T13:51:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"490a1a6549cb57418246b572b656742370b7f45a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/3/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/3/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/lib-version-number/issues/3/comments","statuses_url":"https://api.github.com/repos/jenkinsci/lib-version-number/statuses/6acabf980f2e6d2cbd56427894ae48644510e914","head":{"label":"recena:digit","ref":"digit","sha":"6acabf980f2e6d2cbd56427894ae48644510e914","user":{"login":"recena","id":1021745,"avatar_url":"https://avatars0.githubusercontent.com/u/1021745?v=3","gravatar_id":"","url":"https://api.github.com/users/recena","html_url":"https://github.com/recena","followers_url":"https://api.github.com/users/recena/followers","following_url":"https://api.github.com/users/recena/following{/other_user}","gists_url":"https://api.github.com/users/recena/gists{/gist_id}","starred_url":"https://api.github.com/users/recena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/recena/subscriptions","organizations_url":"https://api.github.com/users/recena/orgs","repos_url":"https://api.github.com/users/recena/repos","events_url":"https://api.github.com/users/recena/events{/privacy}","received_events_url":"https://api.github.com/users/recena/received_events","type":"User","site_admin":false},"repo":{"id":83844802,"name":"lib-version-number","full_name":"recena/lib-version-number","owner":{"login":"recena","id":1021745,"avatar_url":"https://avatars0.githubusercontent.com/u/1021745?v=3","gravatar_id":"","url":"https://api.github.com/users/recena","html_url":"https://github.com/recena","followers_url":"https://api.github.com/users/recena/followers","following_url":"https://api.github.com/users/recena/following{/other_user}","gists_url":"https://api.github.com/users/recena/gists{/gist_id}","starred_url":"https://api.github.com/users/recena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/recena/subscriptions","organizations_url":"https://api.github.com/users/recena/orgs","repos_url":"https://api.github.com/users/recena/repos","events_url":"https://api.github.com/users/recena/events{/privacy}","received_events_url":"https://api.github.com/users/recena/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/recena/lib-version-number","description":"Version Number class for doing reasoning with version numbers","fork":true,"url":"https://api.github.com/repos/recena/lib-version-number","forks_url":"https://api.github.com/repos/recena/lib-version-number/forks","keys_url":"https://api.github.com/repos/recena/lib-version-number/keys{/key_id}","collaborators_url":"https://api.github.com/repos/recena/lib-version-number/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/recena/lib-version-number/teams","hooks_url":"https://api.github.com/repos/recena/lib-version-number/hooks","issue_events_url":"https://api.github.com/repos/recena/lib-version-number/issues/events{/number}","events_url":"https://api.github.com/repos/recena/lib-version-number/events","assignees_url":"https://api.github.com/repos/recena/lib-version-number/assignees{/user}","branches_url":"https://api.github.com/repos/recena/lib-version-number/branches{/branch}","tags_url":"https://api.github.com/repos/recena/lib-version-number/tags","blobs_url":"https://api.github.com/repos/recena/lib-version-number/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/recena/lib-version-number/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/recena/lib-version-number/git/refs{/sha}","trees_url":"https://api.github.com/repos/recena/lib-version-number/git/trees{/sha}","statuses_url":"https://api.github.com/repos/recena/lib-version-number/statuses/{sha}","languages_url":"https://api.github.com/repos/recena/lib-version-number/languages","stargazers_url":"https://api.github.com/repos/recena/lib-version-number/stargazers","contributors_url":"https://api.github.com/repos/recena/lib-version-number/contributors","subscribers_url":"https://api.github.com/repos/recena/lib-version-number/subscribers","subscription_url":"https://api.github.com/repos/recena/lib-version-number/subscription","commits_url":"https://api.github.com/repos/recena/lib-version-number/commits{/sha}","git_commits_url":"https://api.github.com/repos/recena/lib-version-number/git/commits{/sha}","comments_url":"https://api.github.com/repos/recena/lib-version-number/comments{/number}","issue_comment_url":"https://api.github.com/repos/recena/lib-version-number/issues/comments{/number}","contents_url":"https://api.github.com/repos/recena/lib-version-number/contents/{+path}","compare_url":"https://api.github.com/repos/recena/lib-version-number/compare/{base}...{head}","merges_url":"https://api.github.com/repos/recena/lib-version-number/merges","archive_url":"https://api.github.com/repos/recena/lib-version-number/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/recena/lib-version-number/downloads","issues_url":"https://api.github.com/repos/recena/lib-version-number/issues{/number}","pulls_url":"https://api.github.com/repos/recena/lib-version-number/pulls{/number}","milestones_url":"https://api.github.com/repos/recena/lib-version-number/milestones{/number}","notifications_url":"https://api.github.com/repos/recena/lib-version-number/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/recena/lib-version-number/labels{/name}","releases_url":"https://api.github.com/repos/recena/lib-version-number/releases{/id}","deployments_url":"https://api.github.com/repos/recena/lib-version-number/deployments","created_at":"2017-03-03T21:53:56Z","updated_at":"2017-03-03T21:53:57Z","pushed_at":"2017-03-06T13:46:55Z","git_url":"git://github.com/recena/lib-version-number.git","ssh_url":"git@github.com:recena/lib-version-number.git","clone_url":"https://github.com/recena/lib-version-number.git","svn_url":"https://github.com/recena/lib-version-number","homepage":"http://jenkins-ci.org/","size":40,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"629b7ebd398f65fcb4b4944c6a123408bb15beb4","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars3.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":2381544,"name":"lib-version-number","full_name":"jenkinsci/lib-version-number","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars3.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/lib-version-number","description":"Version Number class for doing reasoning with version numbers","fork":false,"url":"https://api.github.com/repos/jenkinsci/lib-version-number","forks_url":"https://api.github.com/repos/jenkinsci/lib-version-number/forks","keys_url":"https://api.github.com/repos/jenkinsci/lib-version-number/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/lib-version-number/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/lib-version-number/teams","hooks_url":"https://api.github.com/repos/jenkinsci/lib-version-number/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/lib-version-number/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/lib-version-number/events","assignees_url":"https://api.github.com/repos/jenkinsci/lib-version-number/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/lib-version-number/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/lib-version-number/tags","blobs_url":"https://api.github.com/repos/jenkinsci/lib-version-number/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/lib-version-number/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/lib-version-number/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/lib-version-number/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/lib-version-number/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/lib-version-number/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/lib-version-number/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/lib-version-number/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/lib-version-number/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/lib-version-number/subscription","commits_url":"https://api.github.com/repos/jenkinsci/lib-version-number/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/lib-version-number/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/lib-version-number/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/lib-version-number/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/lib-version-number/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/lib-version-number/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/lib-version-number/merges","archive_url":"https://api.github.com/repos/jenkinsci/lib-version-number/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/lib-version-number/downloads","issues_url":"https://api.github.com/repos/jenkinsci/lib-version-number/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/lib-version-number/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/lib-version-number/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/lib-version-number/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/lib-version-number/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/lib-version-number/deployments","created_at":"2011-09-13T21:29:47Z","updated_at":"2017-02-10T17:12:43Z","pushed_at":"2017-03-06T13:46:56Z","git_url":"git://github.com/jenkinsci/lib-version-number.git","ssh_url":"git@github.com:jenkinsci/lib-version-number.git","clone_url":"https://github.com/jenkinsci/lib-version-number.git","svn_url":"https://github.com/jenkinsci/lib-version-number","homepage":"http://jenkins-ci.org/","size":38,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/3"},"html":{"href":"https://github.com/jenkinsci/lib-version-number/pull/3"},"issue":{"href":"https://api.github.com/repos/jenkinsci/lib-version-number/issues/3"},"comments":{"href":"https://api.github.com/repos/jenkinsci/lib-version-number/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/lib-version-number/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/lib-version-number/statuses/6acabf980f2e6d2cbd56427894ae48644510e914"}}}}
{"actor":{"display_login":"stephenc"}}