{"action":"reopened","number":163,"pull_request":{"url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/pulls/163","id":92237683,"html_url":"https://github.com/johnmyleswhite/ProjectTemplate/pull/163","diff_url":"https://github.com/johnmyleswhite/ProjectTemplate/pull/163.diff","patch_url":"https://github.com/johnmyleswhite/ProjectTemplate/pull/163.patch","issue_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/issues/163","number":163,"state":"open","locked":false,"title":"Clean exit for more functions when current directory is not valid Project template","user":{"login":"connectedblue","id":16526825,"avatar_url":"https://avatars.githubusercontent.com/u/16526825?v=3","gravatar_id":"","url":"https://api.github.com/users/connectedblue","html_url":"https://github.com/connectedblue","followers_url":"https://api.github.com/users/connectedblue/followers","following_url":"https://api.github.com/users/connectedblue/following{/other_user}","gists_url":"https://api.github.com/users/connectedblue/gists{/gist_id}","starred_url":"https://api.github.com/users/connectedblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connectedblue/subscriptions","organizations_url":"https://api.github.com/users/connectedblue/orgs","repos_url":"https://api.github.com/users/connectedblue/repos","events_url":"https://api.github.com/users/connectedblue/events{/privacy}","received_events_url":"https://api.github.com/users/connectedblue/received_events","type":"User","site_admin":false},"body":"This PR proposes extending the feature in #157 to the following functions:\r\n\r\n- `cache()`\r\n- `cache.project()`\r\n- `clear.cache()`\r\n- `reload.project()`\r\n- `test.project()`\r\n\r\nThese will now exit cleanly with an error message if they are executed in a non ProjectTemplate directory.\r\n\r\nIn order to simplify the implementation, two helper functions are created:  `.stopifnotproject()` and `.stopifproject()`.  The `load.project()` and `create.project()` have been refactored to use these new functions.\r\n\r\nThese functions now issue a `stop()` rather than `return(NULL)` so the tests have been modified to account for the new behaviour.\r\n\r\nFinally, since this function is used in a wide range of functions, the helpers have been moved away from the `load.project.R` to a new file called `stopifnotproject.R` for ease of reference.","created_at":"2016-11-03T20:51:39Z","updated_at":"2016-11-03T22:41:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66b01e8809dd5cd64542d2965b79a71baa001114","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/pulls/163/commits","review_comments_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/pulls/163/comments","review_comment_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/issues/163/comments","statuses_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/statuses/c26e09f5b53669e60fce02744f0d9fdda23aedfd","head":{"label":"connectedblue:stopifnotproject","ref":"stopifnotproject","sha":"c26e09f5b53669e60fce02744f0d9fdda23aedfd","user":{"login":"connectedblue","id":16526825,"avatar_url":"https://avatars.githubusercontent.com/u/16526825?v=3","gravatar_id":"","url":"https://api.github.com/users/connectedblue","html_url":"https://github.com/connectedblue","followers_url":"https://api.github.com/users/connectedblue/followers","following_url":"https://api.github.com/users/connectedblue/following{/other_user}","gists_url":"https://api.github.com/users/connectedblue/gists{/gist_id}","starred_url":"https://api.github.com/users/connectedblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connectedblue/subscriptions","organizations_url":"https://api.github.com/users/connectedblue/orgs","repos_url":"https://api.github.com/users/connectedblue/repos","events_url":"https://api.github.com/users/connectedblue/events{/privacy}","received_events_url":"https://api.github.com/users/connectedblue/received_events","type":"User","site_admin":false},"repo":{"id":66717778,"name":"ProjectTemplate2","full_name":"connectedblue/ProjectTemplate2","owner":{"login":"connectedblue","id":16526825,"avatar_url":"https://avatars.githubusercontent.com/u/16526825?v=3","gravatar_id":"","url":"https://api.github.com/users/connectedblue","html_url":"https://github.com/connectedblue","followers_url":"https://api.github.com/users/connectedblue/followers","following_url":"https://api.github.com/users/connectedblue/following{/other_user}","gists_url":"https://api.github.com/users/connectedblue/gists{/gist_id}","starred_url":"https://api.github.com/users/connectedblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connectedblue/subscriptions","organizations_url":"https://api.github.com/users/connectedblue/orgs","repos_url":"https://api.github.com/users/connectedblue/repos","events_url":"https://api.github.com/users/connectedblue/events{/privacy}","received_events_url":"https://api.github.com/users/connectedblue/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/connectedblue/ProjectTemplate2","description":"A fork of the ProjectTemplate package with some additional functionality added.  All the new functionality is added in branches  and submitted back to main project for consideration. Idea is to keep master synced with the upstream.   If the new pieces of functionality are isolated in different branches, they'll be easier to submit ","fork":true,"url":"https://api.github.com/repos/connectedblue/ProjectTemplate2","forks_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/forks","keys_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/teams","hooks_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/hooks","issue_events_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/issues/events{/number}","events_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/events","assignees_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/assignees{/user}","branches_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/branches{/branch}","tags_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/tags","blobs_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/git/refs{/sha}","trees_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/statuses/{sha}","languages_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/languages","stargazers_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/stargazers","contributors_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/contributors","subscribers_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/subscribers","subscription_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/subscription","commits_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/commits{/sha}","git_commits_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/git/commits{/sha}","comments_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/comments{/number}","issue_comment_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/issues/comments{/number}","contents_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/contents/{+path}","compare_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/merges","archive_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/downloads","issues_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/issues{/number}","pulls_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/pulls{/number}","milestones_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/milestones{/number}","notifications_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/labels{/name}","releases_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/releases{/id}","deployments_url":"https://api.github.com/repos/connectedblue/ProjectTemplate2/deployments","created_at":"2016-08-27T14:13:21Z","updated_at":"2016-11-01T02:56:37Z","pushed_at":"2016-11-03T22:39:44Z","git_url":"git://github.com/connectedblue/ProjectTemplate2.git","ssh_url":"git@github.com:connectedblue/ProjectTemplate2.git","clone_url":"https://github.com/connectedblue/ProjectTemplate2.git","svn_url":"https://github.com/connectedblue/ProjectTemplate2","homepage":"http://projecttemplate.net","size":55894,"stargazers_count":1,"watchers_count":1,"language":"R","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"johnmyleswhite:master","ref":"master","sha":"2ff97d683bea35558300343775e29ca8b70a8167","user":{"login":"johnmyleswhite","id":22064,"avatar_url":"https://avatars.githubusercontent.com/u/22064?v=3","gravatar_id":"","url":"https://api.github.com/users/johnmyleswhite","html_url":"https://github.com/johnmyleswhite","followers_url":"https://api.github.com/users/johnmyleswhite/followers","following_url":"https://api.github.com/users/johnmyleswhite/following{/other_user}","gists_url":"https://api.github.com/users/johnmyleswhite/gists{/gist_id}","starred_url":"https://api.github.com/users/johnmyleswhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnmyleswhite/subscriptions","organizations_url":"https://api.github.com/users/johnmyleswhite/orgs","repos_url":"https://api.github.com/users/johnmyleswhite/repos","events_url":"https://api.github.com/users/johnmyleswhite/events{/privacy}","received_events_url":"https://api.github.com/users/johnmyleswhite/received_events","type":"User","site_admin":false},"repo":{"id":859592,"name":"ProjectTemplate","full_name":"johnmyleswhite/ProjectTemplate","owner":{"login":"johnmyleswhite","id":22064,"avatar_url":"https://avatars.githubusercontent.com/u/22064?v=3","gravatar_id":"","url":"https://api.github.com/users/johnmyleswhite","html_url":"https://github.com/johnmyleswhite","followers_url":"https://api.github.com/users/johnmyleswhite/followers","following_url":"https://api.github.com/users/johnmyleswhite/following{/other_user}","gists_url":"https://api.github.com/users/johnmyleswhite/gists{/gist_id}","starred_url":"https://api.github.com/users/johnmyleswhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnmyleswhite/subscriptions","organizations_url":"https://api.github.com/users/johnmyleswhite/orgs","repos_url":"https://api.github.com/users/johnmyleswhite/repos","events_url":"https://api.github.com/users/johnmyleswhite/events{/privacy}","received_events_url":"https://api.github.com/users/johnmyleswhite/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johnmyleswhite/ProjectTemplate","description":"A template utility for R projects that provides a skeletal project.","fork":false,"url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate","forks_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/forks","keys_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/teams","hooks_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/hooks","issue_events_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/issues/events{/number}","events_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/events","assignees_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/assignees{/user}","branches_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/branches{/branch}","tags_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/tags","blobs_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/git/refs{/sha}","trees_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/statuses/{sha}","languages_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/languages","stargazers_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/stargazers","contributors_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/contributors","subscribers_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/subscribers","subscription_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/subscription","commits_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/commits{/sha}","git_commits_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/git/commits{/sha}","comments_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/comments{/number}","issue_comment_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/issues/comments{/number}","contents_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/contents/{+path}","compare_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/merges","archive_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/downloads","issues_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/issues{/number}","pulls_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/pulls{/number}","milestones_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/milestones{/number}","notifications_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/labels{/name}","releases_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/releases{/id}","deployments_url":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/deployments","created_at":"2010-08-24T17:22:36Z","updated_at":"2016-11-02T18:59:33Z","pushed_at":"2016-11-03T22:17:39Z","git_url":"git://github.com/johnmyleswhite/ProjectTemplate.git","ssh_url":"git@github.com:johnmyleswhite/ProjectTemplate.git","clone_url":"https://github.com/johnmyleswhite/ProjectTemplate.git","svn_url":"https://github.com/johnmyleswhite/ProjectTemplate","homepage":"http://projecttemplate.net","size":60162,"stargazers_count":432,"watchers_count":432,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":121,"mirror_url":null,"open_issues_count":34,"forks":121,"open_issues":34,"watchers":432,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/pulls/163"},"html":{"href":"https://github.com/johnmyleswhite/ProjectTemplate/pull/163"},"issue":{"href":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/issues/163"},"comments":{"href":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/issues/163/comments"},"review_comments":{"href":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/pulls/163/comments"},"review_comment":{"href":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/pulls/163/commits"},"statuses":{"href":"https://api.github.com/repos/johnmyleswhite/ProjectTemplate/statuses/c26e09f5b53669e60fce02744f0d9fdda23aedfd"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":2,"review_comments":0,"commits":10,"additions":122,"deletions":58,"changed_files":12}}
{"actor":{"display_login":"connectedblue"}}