{"action":"closed","number":774,"pull_request":{"url":"https://api.github.com/repos/NetLogo/NetLogo/pulls/774","id":34783350,"html_url":"https://github.com/NetLogo/NetLogo/pull/774","diff_url":"https://github.com/NetLogo/NetLogo/pull/774.diff","patch_url":"https://github.com/NetLogo/NetLogo/pull/774.patch","issue_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/774","number":774,"state":"closed","locked":false,"title":"add Online Models dialog","user":{"login":"nicolaspayette","id":908754,"avatar_url":"https://avatars.githubusercontent.com/u/908754?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolaspayette","html_url":"https://github.com/nicolaspayette","followers_url":"https://api.github.com/users/nicolaspayette/followers","following_url":"https://api.github.com/users/nicolaspayette/following{/other_user}","gists_url":"https://api.github.com/users/nicolaspayette/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolaspayette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolaspayette/subscriptions","organizations_url":"https://api.github.com/users/nicolaspayette/orgs","repos_url":"https://api.github.com/users/nicolaspayette/repos","events_url":"https://api.github.com/users/nicolaspayette/events{/privacy}","received_events_url":"https://api.github.com/users/nicolaspayette/received_events","type":"User","site_admin":false},"body":"(This is emphatically just a prototype. This pull request should not get merged.)\r\n\r\n## What is it?\r\n\r\nA tool to browse GitHub for NetLogo models and load them directly in NetLogo. The idea stems from a chat with @frankduncan so he gets credit for it (but flaws in execution are mine alone).\r\n\r\nHere is a screenshot:\r\n\r\n![screenshot from 2015-05-05 21 24 52](https://cloud.githubusercontent.com/assets/908754/7486138/4f080150-f36e-11e4-89af-5355e11a350a.png)\r\n\r\n- The left panel is a tree, just like in the model library dialog. Top nodes are repos, and you have their directory structure under them, showing only folders with NetLogo files.\r\n\r\n- The right panel shows the readme if a repository node is selected or the info tab content if a model is selected. We could conceivably generate and add preview images.\r\n\r\nTo use it, bring it up from the **File** menu (or <kbd>Ctrl</kbd>+<kbd>g</kbd>) enter your GitHub username/password and click **(Re)Load from GitHub**.\r\n\r\nIt shows every GitHub repo that _you_ have access to, i.e. all public repos + your private repos.\r\n\r\nClick **Open** to load the selected model (double-clicking doesn't work yet).\r\n\r\n## What's currently wrong with it?\r\n\r\n- The code is really messy, mixing up GUI and GitHub api querying stuff.\r\n\r\n- There is almost no error handling. If something goes wrong with a request, things just won't load.\r\n\r\n- Support files (e.g., data, images, .nls files, etc.) are not downloaded.\r\n\r\n- Of course, if a model needs an unbundled extension, it doesn't get downloaded either.\r\n\r\n- Nothing is currently cached on disk between sessions (this is bad for speed and api rate limit).\r\n\r\n- Everything (i.e., every model file, once the info tab is displayed) stays in memory for the whole session.\r\n\r\n- The user currently needs to log into GitHub using username/password (the password is not stored). It's probably possible to make life easier for the user using OAuth tokens or something; I'm not very familiar with this stuff. There is no way around the fact that GitHub requires authentification, though. Anonymous API queries are limited to 60/hour (https://developer.github.com/v3/#rate-limiting) which is not nearly enough.\r\n\r\n- Need to find a workaround for https://github.com/NetLogo/NetLogo/commit/d7b654f9e282251db5b1a66f5767a50a5ea9222b.\r\n\r\nWhether or not an improved version of this should get integrated into NetLogo is an open question. We could also make it a plugin at first.\r\n\r\nThat being said, I already had a lot of fun just browsing the tree and looking at people's models!\r\n\r\nComments welcome.\r\n","created_at":"2015-05-06T01:40:02Z","updated_at":"2016-01-11T17:32:17Z","closed_at":"2016-01-11T17:32:17Z","merged_at":null,"merge_commit_sha":"1b8c9eab6181e85c50a311e3b3e4fab3ba2cd172","assignee":null,"milestone":{"url":"https://api.github.com/repos/NetLogo/NetLogo/milestones/21","html_url":"https://github.com/NetLogo/NetLogo/milestones/Hexy%20Honeycomb","labels_url":"https://api.github.com/repos/NetLogo/NetLogo/milestones/21/labels","id":1311174,"number":21,"title":"Hexy Honeycomb","description":"","creator":{"login":"mrerrormessage","id":143198,"avatar_url":"https://avatars.githubusercontent.com/u/143198?v=3","gravatar_id":"","url":"https://api.github.com/users/mrerrormessage","html_url":"https://github.com/mrerrormessage","followers_url":"https://api.github.com/users/mrerrormessage/followers","following_url":"https://api.github.com/users/mrerrormessage/following{/other_user}","gists_url":"https://api.github.com/users/mrerrormessage/gists{/gist_id}","starred_url":"https://api.github.com/users/mrerrormessage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrerrormessage/subscriptions","organizations_url":"https://api.github.com/users/mrerrormessage/orgs","repos_url":"https://api.github.com/users/mrerrormessage/repos","events_url":"https://api.github.com/users/mrerrormessage/events{/privacy}","received_events_url":"https://api.github.com/users/mrerrormessage/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":9,"state":"open","created_at":"2015-09-17T18:05:24Z","updated_at":"2016-01-11T17:32:17Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/NetLogo/NetLogo/pulls/774/commits","review_comments_url":"https://api.github.com/repos/NetLogo/NetLogo/pulls/774/comments","review_comment_url":"https://api.github.com/repos/NetLogo/NetLogo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/774/comments","statuses_url":"https://api.github.com/repos/NetLogo/NetLogo/statuses/74b55710f6895844a8cb984162234948bdab48a4","head":{"label":"NetLogo:wip-github-models","ref":"wip-github-models","sha":"74b55710f6895844a8cb984162234948bdab48a4","user":{"login":"NetLogo","id":767367,"avatar_url":"https://avatars.githubusercontent.com/u/767367?v=3","gravatar_id":"","url":"https://api.github.com/users/NetLogo","html_url":"https://github.com/NetLogo","followers_url":"https://api.github.com/users/NetLogo/followers","following_url":"https://api.github.com/users/NetLogo/following{/other_user}","gists_url":"https://api.github.com/users/NetLogo/gists{/gist_id}","starred_url":"https://api.github.com/users/NetLogo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetLogo/subscriptions","organizations_url":"https://api.github.com/users/NetLogo/orgs","repos_url":"https://api.github.com/users/NetLogo/repos","events_url":"https://api.github.com/users/NetLogo/events{/privacy}","received_events_url":"https://api.github.com/users/NetLogo/received_events","type":"Organization","site_admin":false},"repo":{"id":2594187,"name":"NetLogo","full_name":"NetLogo/NetLogo","owner":{"login":"NetLogo","id":767367,"avatar_url":"https://avatars.githubusercontent.com/u/767367?v=3","gravatar_id":"","url":"https://api.github.com/users/NetLogo","html_url":"https://github.com/NetLogo","followers_url":"https://api.github.com/users/NetLogo/followers","following_url":"https://api.github.com/users/NetLogo/following{/other_user}","gists_url":"https://api.github.com/users/NetLogo/gists{/gist_id}","starred_url":"https://api.github.com/users/NetLogo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetLogo/subscriptions","organizations_url":"https://api.github.com/users/NetLogo/orgs","repos_url":"https://api.github.com/users/NetLogo/repos","events_url":"https://api.github.com/users/NetLogo/events{/privacy}","received_events_url":"https://api.github.com/users/NetLogo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NetLogo/NetLogo","description":"turtles, patches, and links for kids, teachers, and scientists","fork":false,"url":"https://api.github.com/repos/NetLogo/NetLogo","forks_url":"https://api.github.com/repos/NetLogo/NetLogo/forks","keys_url":"https://api.github.com/repos/NetLogo/NetLogo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NetLogo/NetLogo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NetLogo/NetLogo/teams","hooks_url":"https://api.github.com/repos/NetLogo/NetLogo/hooks","issue_events_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/events{/number}","events_url":"https://api.github.com/repos/NetLogo/NetLogo/events","assignees_url":"https://api.github.com/repos/NetLogo/NetLogo/assignees{/user}","branches_url":"https://api.github.com/repos/NetLogo/NetLogo/branches{/branch}","tags_url":"https://api.github.com/repos/NetLogo/NetLogo/tags","blobs_url":"https://api.github.com/repos/NetLogo/NetLogo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NetLogo/NetLogo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NetLogo/NetLogo/git/refs{/sha}","trees_url":"https://api.github.com/repos/NetLogo/NetLogo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NetLogo/NetLogo/statuses/{sha}","languages_url":"https://api.github.com/repos/NetLogo/NetLogo/languages","stargazers_url":"https://api.github.com/repos/NetLogo/NetLogo/stargazers","contributors_url":"https://api.github.com/repos/NetLogo/NetLogo/contributors","subscribers_url":"https://api.github.com/repos/NetLogo/NetLogo/subscribers","subscription_url":"https://api.github.com/repos/NetLogo/NetLogo/subscription","commits_url":"https://api.github.com/repos/NetLogo/NetLogo/commits{/sha}","git_commits_url":"https://api.github.com/repos/NetLogo/NetLogo/git/commits{/sha}","comments_url":"https://api.github.com/repos/NetLogo/NetLogo/comments{/number}","issue_comment_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/comments{/number}","contents_url":"https://api.github.com/repos/NetLogo/NetLogo/contents/{+path}","compare_url":"https://api.github.com/repos/NetLogo/NetLogo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NetLogo/NetLogo/merges","archive_url":"https://api.github.com/repos/NetLogo/NetLogo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NetLogo/NetLogo/downloads","issues_url":"https://api.github.com/repos/NetLogo/NetLogo/issues{/number}","pulls_url":"https://api.github.com/repos/NetLogo/NetLogo/pulls{/number}","milestones_url":"https://api.github.com/repos/NetLogo/NetLogo/milestones{/number}","notifications_url":"https://api.github.com/repos/NetLogo/NetLogo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NetLogo/NetLogo/labels{/name}","releases_url":"https://api.github.com/repos/NetLogo/NetLogo/releases{/id}","created_at":"2011-10-17T19:20:01Z","updated_at":"2016-01-11T14:02:35Z","pushed_at":"2016-01-11T17:32:17Z","git_url":"git://github.com/NetLogo/NetLogo.git","ssh_url":"git@github.com:NetLogo/NetLogo.git","clone_url":"https://github.com/NetLogo/NetLogo.git","svn_url":"https://github.com/NetLogo/NetLogo","homepage":"http://ccl.northwestern.edu/netlogo/","size":34980,"stargazers_count":266,"watchers_count":266,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":293,"forks":79,"open_issues":293,"watchers":266,"default_branch":"5.x"}},"base":{"label":"NetLogo:6.x","ref":"6.x","sha":"7046038a1fb14db15abec8789410b01fa10dfbf8","user":{"login":"NetLogo","id":767367,"avatar_url":"https://avatars.githubusercontent.com/u/767367?v=3","gravatar_id":"","url":"https://api.github.com/users/NetLogo","html_url":"https://github.com/NetLogo","followers_url":"https://api.github.com/users/NetLogo/followers","following_url":"https://api.github.com/users/NetLogo/following{/other_user}","gists_url":"https://api.github.com/users/NetLogo/gists{/gist_id}","starred_url":"https://api.github.com/users/NetLogo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetLogo/subscriptions","organizations_url":"https://api.github.com/users/NetLogo/orgs","repos_url":"https://api.github.com/users/NetLogo/repos","events_url":"https://api.github.com/users/NetLogo/events{/privacy}","received_events_url":"https://api.github.com/users/NetLogo/received_events","type":"Organization","site_admin":false},"repo":{"id":2594187,"name":"NetLogo","full_name":"NetLogo/NetLogo","owner":{"login":"NetLogo","id":767367,"avatar_url":"https://avatars.githubusercontent.com/u/767367?v=3","gravatar_id":"","url":"https://api.github.com/users/NetLogo","html_url":"https://github.com/NetLogo","followers_url":"https://api.github.com/users/NetLogo/followers","following_url":"https://api.github.com/users/NetLogo/following{/other_user}","gists_url":"https://api.github.com/users/NetLogo/gists{/gist_id}","starred_url":"https://api.github.com/users/NetLogo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetLogo/subscriptions","organizations_url":"https://api.github.com/users/NetLogo/orgs","repos_url":"https://api.github.com/users/NetLogo/repos","events_url":"https://api.github.com/users/NetLogo/events{/privacy}","received_events_url":"https://api.github.com/users/NetLogo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NetLogo/NetLogo","description":"turtles, patches, and links for kids, teachers, and scientists","fork":false,"url":"https://api.github.com/repos/NetLogo/NetLogo","forks_url":"https://api.github.com/repos/NetLogo/NetLogo/forks","keys_url":"https://api.github.com/repos/NetLogo/NetLogo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NetLogo/NetLogo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NetLogo/NetLogo/teams","hooks_url":"https://api.github.com/repos/NetLogo/NetLogo/hooks","issue_events_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/events{/number}","events_url":"https://api.github.com/repos/NetLogo/NetLogo/events","assignees_url":"https://api.github.com/repos/NetLogo/NetLogo/assignees{/user}","branches_url":"https://api.github.com/repos/NetLogo/NetLogo/branches{/branch}","tags_url":"https://api.github.com/repos/NetLogo/NetLogo/tags","blobs_url":"https://api.github.com/repos/NetLogo/NetLogo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NetLogo/NetLogo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NetLogo/NetLogo/git/refs{/sha}","trees_url":"https://api.github.com/repos/NetLogo/NetLogo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NetLogo/NetLogo/statuses/{sha}","languages_url":"https://api.github.com/repos/NetLogo/NetLogo/languages","stargazers_url":"https://api.github.com/repos/NetLogo/NetLogo/stargazers","contributors_url":"https://api.github.com/repos/NetLogo/NetLogo/contributors","subscribers_url":"https://api.github.com/repos/NetLogo/NetLogo/subscribers","subscription_url":"https://api.github.com/repos/NetLogo/NetLogo/subscription","commits_url":"https://api.github.com/repos/NetLogo/NetLogo/commits{/sha}","git_commits_url":"https://api.github.com/repos/NetLogo/NetLogo/git/commits{/sha}","comments_url":"https://api.github.com/repos/NetLogo/NetLogo/comments{/number}","issue_comment_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/comments{/number}","contents_url":"https://api.github.com/repos/NetLogo/NetLogo/contents/{+path}","compare_url":"https://api.github.com/repos/NetLogo/NetLogo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NetLogo/NetLogo/merges","archive_url":"https://api.github.com/repos/NetLogo/NetLogo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NetLogo/NetLogo/downloads","issues_url":"https://api.github.com/repos/NetLogo/NetLogo/issues{/number}","pulls_url":"https://api.github.com/repos/NetLogo/NetLogo/pulls{/number}","milestones_url":"https://api.github.com/repos/NetLogo/NetLogo/milestones{/number}","notifications_url":"https://api.github.com/repos/NetLogo/NetLogo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NetLogo/NetLogo/labels{/name}","releases_url":"https://api.github.com/repos/NetLogo/NetLogo/releases{/id}","created_at":"2011-10-17T19:20:01Z","updated_at":"2016-01-11T14:02:35Z","pushed_at":"2016-01-11T17:32:17Z","git_url":"git://github.com/NetLogo/NetLogo.git","ssh_url":"git@github.com:NetLogo/NetLogo.git","clone_url":"https://github.com/NetLogo/NetLogo.git","svn_url":"https://github.com/NetLogo/NetLogo","homepage":"http://ccl.northwestern.edu/netlogo/","size":34980,"stargazers_count":266,"watchers_count":266,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":293,"forks":79,"open_issues":293,"watchers":266,"default_branch":"5.x"}},"_links":{"self":{"href":"https://api.github.com/repos/NetLogo/NetLogo/pulls/774"},"html":{"href":"https://github.com/NetLogo/NetLogo/pull/774"},"issue":{"href":"https://api.github.com/repos/NetLogo/NetLogo/issues/774"},"comments":{"href":"https://api.github.com/repos/NetLogo/NetLogo/issues/774/comments"},"review_comments":{"href":"https://api.github.com/repos/NetLogo/NetLogo/pulls/774/comments"},"review_comment":{"href":"https://api.github.com/repos/NetLogo/NetLogo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NetLogo/NetLogo/pulls/774/commits"},"statuses":{"href":"https://api.github.com/repos/NetLogo/NetLogo/statuses/74b55710f6895844a8cb984162234948bdab48a4"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":3,"review_comments":0,"commits":5,"additions":404,"deletions":3,"changed_files":9}}