{"action":"created","comment":{"url":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/comments/73769149","id":73769149,"diff_hunk":"@@ -347,13 +377,33 @@ func GetNewTemplateVersions(path string) (model.Template, bool) {\n \t\tif ok {\n \t\t\tlog.Debugf(\"Template found by path: %s\", path)\n \t\t\tcopyOfversionLinks := make(map[string]string)\n+\n \t\t\tfor key, value := range templateMetadata.VersionLinks {\n \t\t\t\tif value != path {\n \t\t\t\t\totherVersionTokens := strings.Split(value, \":\")\n \t\t\t\t\toVersion := otherVersionTokens[2]\n-\t\t\t\t\totherVersion, err := strconv.Atoi(oVersion)\n \n-\t\t\t\t\tif err == nil && otherVersion > currentVersion {\n+\t\t\t\t\trancherComposePathOther := CatalogRootDir + catalogID + \"/templates/\" + parentPath + \"/\" + oVersion","path":"manager/catalog_manager.go","position":78,"original_position":78,"commit_id":"517362ad31fed70fb425e22fbc2e2d5a5c0feac4","original_commit_id":"517362ad31fed70fb425e22fbc2e2d5a5c0feac4","user":{"login":"vincent99","id":753917,"avatar_url":"https://avatars.githubusercontent.com/u/753917?v=3","gravatar_id":"","url":"https://api.github.com/users/vincent99","html_url":"https://github.com/vincent99","followers_url":"https://api.github.com/users/vincent99/followers","following_url":"https://api.github.com/users/vincent99/following{/other_user}","gists_url":"https://api.github.com/users/vincent99/gists{/gist_id}","starred_url":"https://api.github.com/users/vincent99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincent99/subscriptions","organizations_url":"https://api.github.com/users/vincent99/orgs","repos_url":"https://api.github.com/users/vincent99/repos","events_url":"https://api.github.com/users/vincent99/events{/privacy}","received_events_url":"https://api.github.com/users/vincent99/received_events","type":"User","site_admin":false},"body":"All this is repeated too, combine into a single function something like `getVersionForPath(path string) string {}`that reads a file, unmarshalls, and returns semversion.","created_at":"2016-08-05T22:37:43Z","updated_at":"2016-08-05T22:37:43Z","html_url":"https://github.com/rancher/rancher-catalog-service/pull/62#discussion_r73769149","pull_request_url":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/62","_links":{"self":{"href":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/comments/73769149"},"html":{"href":"https://github.com/rancher/rancher-catalog-service/pull/62#discussion_r73769149"},"pull_request":{"href":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/62"}}},"pull_request":{"url":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/62","id":80315332,"html_url":"https://github.com/rancher/rancher-catalog-service/pull/62","diff_url":"https://github.com/rancher/rancher-catalog-service/pull/62.diff","patch_url":"https://github.com/rancher/rancher-catalog-service/pull/62.patch","issue_url":"https://api.github.com/repos/rancher/rancher-catalog-service/issues/62","number":62,"state":"open","locked":false,"title":"Compares versions in place of template folder numbers","user":{"login":"mrajashree","id":10672776,"avatar_url":"https://avatars.githubusercontent.com/u/10672776?v=3","gravatar_id":"","url":"https://api.github.com/users/mrajashree","html_url":"https://github.com/mrajashree","followers_url":"https://api.github.com/users/mrajashree/followers","following_url":"https://api.github.com/users/mrajashree/following{/other_user}","gists_url":"https://api.github.com/users/mrajashree/gists{/gist_id}","starred_url":"https://api.github.com/users/mrajashree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrajashree/subscriptions","organizations_url":"https://api.github.com/users/mrajashree/orgs","repos_url":"https://api.github.com/users/mrajashree/repos","events_url":"https://api.github.com/users/mrajashree/events{/privacy}","received_events_url":"https://api.github.com/users/mrajashree/received_events","type":"User","site_admin":false},"body":"upgradeVersionLinks is updated by comparing versions in place of template's folder numbers.","created_at":"2016-08-05T22:23:17Z","updated_at":"2016-08-05T22:37:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0555e4bcdfaabb664b5b4e2c950355b1f39406b9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/62/commits","review_comments_url":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/62/comments","review_comment_url":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancher/rancher-catalog-service/issues/62/comments","statuses_url":"https://api.github.com/repos/rancher/rancher-catalog-service/statuses/517362ad31fed70fb425e22fbc2e2d5a5c0feac4","head":{"label":"mrajashree:version_comparison","ref":"version_comparison","sha":"517362ad31fed70fb425e22fbc2e2d5a5c0feac4","user":{"login":"mrajashree","id":10672776,"avatar_url":"https://avatars.githubusercontent.com/u/10672776?v=3","gravatar_id":"","url":"https://api.github.com/users/mrajashree","html_url":"https://github.com/mrajashree","followers_url":"https://api.github.com/users/mrajashree/followers","following_url":"https://api.github.com/users/mrajashree/following{/other_user}","gists_url":"https://api.github.com/users/mrajashree/gists{/gist_id}","starred_url":"https://api.github.com/users/mrajashree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrajashree/subscriptions","organizations_url":"https://api.github.com/users/mrajashree/orgs","repos_url":"https://api.github.com/users/mrajashree/repos","events_url":"https://api.github.com/users/mrajashree/events{/privacy}","received_events_url":"https://api.github.com/users/mrajashree/received_events","type":"User","site_admin":false},"repo":{"id":61840588,"name":"rancher-catalog-service","full_name":"mrajashree/rancher-catalog-service","owner":{"login":"mrajashree","id":10672776,"avatar_url":"https://avatars.githubusercontent.com/u/10672776?v=3","gravatar_id":"","url":"https://api.github.com/users/mrajashree","html_url":"https://github.com/mrajashree","followers_url":"https://api.github.com/users/mrajashree/followers","following_url":"https://api.github.com/users/mrajashree/following{/other_user}","gists_url":"https://api.github.com/users/mrajashree/gists{/gist_id}","starred_url":"https://api.github.com/users/mrajashree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrajashree/subscriptions","organizations_url":"https://api.github.com/users/mrajashree/orgs","repos_url":"https://api.github.com/users/mrajashree/repos","events_url":"https://api.github.com/users/mrajashree/events{/privacy}","received_events_url":"https://api.github.com/users/mrajashree/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrajashree/rancher-catalog-service","description":"A REST API service to list and walkthrough rancher compose templates","fork":true,"url":"https://api.github.com/repos/mrajashree/rancher-catalog-service","forks_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/forks","keys_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/teams","hooks_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/hooks","issue_events_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/issues/events{/number}","events_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/events","assignees_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/assignees{/user}","branches_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/branches{/branch}","tags_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/tags","blobs_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/statuses/{sha}","languages_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/languages","stargazers_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/stargazers","contributors_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/contributors","subscribers_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/subscribers","subscription_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/subscription","commits_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/contents/{+path}","compare_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/merges","archive_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/downloads","issues_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/issues{/number}","pulls_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/pulls{/number}","milestones_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/milestones{/number}","notifications_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/labels{/name}","releases_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/releases{/id}","deployments_url":"https://api.github.com/repos/mrajashree/rancher-catalog-service/deployments","created_at":"2016-06-23T22:19:57Z","updated_at":"2016-06-23T22:19:58Z","pushed_at":"2016-08-05T20:45:54Z","git_url":"git://github.com/mrajashree/rancher-catalog-service.git","ssh_url":"git@github.com:mrajashree/rancher-catalog-service.git","clone_url":"https://github.com/mrajashree/rancher-catalog-service.git","svn_url":"https://github.com/mrajashree/rancher-catalog-service","homepage":"","size":1408,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"rancher:master","ref":"master","sha":"d477b078d42ee5522c1604dd002dc791bfdf446d","user":{"login":"rancher","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"repo":{"id":43917365,"name":"rancher-catalog-service","full_name":"rancher/rancher-catalog-service","owner":{"login":"rancher","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancher/rancher-catalog-service","description":"A REST API service to list and walkthrough rancher compose templates","fork":false,"url":"https://api.github.com/repos/rancher/rancher-catalog-service","forks_url":"https://api.github.com/repos/rancher/rancher-catalog-service/forks","keys_url":"https://api.github.com/repos/rancher/rancher-catalog-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancher/rancher-catalog-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancher/rancher-catalog-service/teams","hooks_url":"https://api.github.com/repos/rancher/rancher-catalog-service/hooks","issue_events_url":"https://api.github.com/repos/rancher/rancher-catalog-service/issues/events{/number}","events_url":"https://api.github.com/repos/rancher/rancher-catalog-service/events","assignees_url":"https://api.github.com/repos/rancher/rancher-catalog-service/assignees{/user}","branches_url":"https://api.github.com/repos/rancher/rancher-catalog-service/branches{/branch}","tags_url":"https://api.github.com/repos/rancher/rancher-catalog-service/tags","blobs_url":"https://api.github.com/repos/rancher/rancher-catalog-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancher/rancher-catalog-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancher/rancher-catalog-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancher/rancher-catalog-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancher/rancher-catalog-service/statuses/{sha}","languages_url":"https://api.github.com/repos/rancher/rancher-catalog-service/languages","stargazers_url":"https://api.github.com/repos/rancher/rancher-catalog-service/stargazers","contributors_url":"https://api.github.com/repos/rancher/rancher-catalog-service/contributors","subscribers_url":"https://api.github.com/repos/rancher/rancher-catalog-service/subscribers","subscription_url":"https://api.github.com/repos/rancher/rancher-catalog-service/subscription","commits_url":"https://api.github.com/repos/rancher/rancher-catalog-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancher/rancher-catalog-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancher/rancher-catalog-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancher/rancher-catalog-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancher/rancher-catalog-service/contents/{+path}","compare_url":"https://api.github.com/repos/rancher/rancher-catalog-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancher/rancher-catalog-service/merges","archive_url":"https://api.github.com/repos/rancher/rancher-catalog-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancher/rancher-catalog-service/downloads","issues_url":"https://api.github.com/repos/rancher/rancher-catalog-service/issues{/number}","pulls_url":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls{/number}","milestones_url":"https://api.github.com/repos/rancher/rancher-catalog-service/milestones{/number}","notifications_url":"https://api.github.com/repos/rancher/rancher-catalog-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancher/rancher-catalog-service/labels{/name}","releases_url":"https://api.github.com/repos/rancher/rancher-catalog-service/releases{/id}","deployments_url":"https://api.github.com/repos/rancher/rancher-catalog-service/deployments","created_at":"2015-10-08T21:31:24Z","updated_at":"2016-07-12T22:31:44Z","pushed_at":"2016-08-05T22:23:17Z","git_url":"git://github.com/rancher/rancher-catalog-service.git","ssh_url":"git@github.com:rancher/rancher-catalog-service.git","clone_url":"https://github.com/rancher/rancher-catalog-service.git","svn_url":"https://github.com/rancher/rancher-catalog-service","homepage":"","size":1405,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":1,"forks":15,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/62"},"html":{"href":"https://github.com/rancher/rancher-catalog-service/pull/62"},"issue":{"href":"https://api.github.com/repos/rancher/rancher-catalog-service/issues/62"},"comments":{"href":"https://api.github.com/repos/rancher/rancher-catalog-service/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancher/rancher-catalog-service/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/rancher/rancher-catalog-service/statuses/517362ad31fed70fb425e22fbc2e2d5a5c0feac4"}}}}
{"actor":{"display_login":"vincent99"}}