{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/devtools/issues/1166","repository_url":"https://api.github.com/repos/hadley/devtools","labels_url":"https://api.github.com/repos/hadley/devtools/issues/1166/labels{/name}","comments_url":"https://api.github.com/repos/hadley/devtools/issues/1166/comments","events_url":"https://api.github.com/repos/hadley/devtools/issues/1166/events","html_url":"https://github.com/hadley/devtools/pull/1166","id":152023990,"number":1166,"title":"Improve install_bitbucket interface and backend ","user":{"login":"imanuelcostigan","id":2107580,"avatar_url":"https://avatars.githubusercontent.com/u/2107580?v=3","gravatar_id":"","url":"https://api.github.com/users/imanuelcostigan","html_url":"https://github.com/imanuelcostigan","followers_url":"https://api.github.com/users/imanuelcostigan/followers","following_url":"https://api.github.com/users/imanuelcostigan/following{/other_user}","gists_url":"https://api.github.com/users/imanuelcostigan/gists{/gist_id}","starred_url":"https://api.github.com/users/imanuelcostigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imanuelcostigan/subscriptions","organizations_url":"https://api.github.com/users/imanuelcostigan/orgs","repos_url":"https://api.github.com/users/imanuelcostigan/repos","events_url":"https://api.github.com/users/imanuelcostigan/events{/privacy}","received_events_url":"https://api.github.com/users/imanuelcostigan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-30T10:53:23Z","updated_at":"2016-05-01T01:33:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hadley/devtools/pulls/1166","html_url":"https://github.com/hadley/devtools/pull/1166","diff_url":"https://github.com/hadley/devtools/pull/1166.diff","patch_url":"https://github.com/hadley/devtools/pull/1166.patch"},"body":"Key user visible changes:\r\n\r\n* Bitbucket authenticates over the OAuth protocol rather than using a username \r\n  and password combination. Access token thus obtained is cached and refreshed\r\n  automatically.\r\n* Bitbucket `refs` are now resolved in `install_bitbucket()` in a manner \r\n  more consistent with `install_github()`.\r\n\r\nOther changes of note:\r\n\r\n* Bitbucket `remote_package_name()` and `remote_sha()` methods no longer call\r\n  github_remote class methods, but are now specifically defined for Bitbucket.\r\n* New Bitbucket repo name parser. This is basically a copy of the github parser, but does not support `version` references as Bitbucket does not have this functionality\r\n* Added Bitbucket test cases.\r\n\r\nKeen to hear feedback on one particular aspect of the first (and most significant) change: namely, I store the OAuth negotiated access token in `~/` so that R sessions started in **any** directory can make use of this, rather than just sessions opened in the directory in which the token is initially created. I do print a message to the console with words to this effect, but it does appear to fall afoul of [CRAN submission policies](https://cran.r-project.org/web/packages/policies.html): \r\n\r\n> Packages should not write in the users’ home filespace, nor anywhere else on the file system apart from the R session’s temporary directory (or during installation in the location pointed to by TMPDIR: and such usage should be cleaned up). Installing into the system’s R installation (e.g., scripts to its bin directory) is not allowed.\r\n"},"comment":{"url":"https://api.github.com/repos/hadley/devtools/issues/comments/216007072","html_url":"https://github.com/hadley/devtools/pull/1166#issuecomment-216007072","issue_url":"https://api.github.com/repos/hadley/devtools/issues/1166","id":216007072,"user":{"login":"imanuelcostigan","id":2107580,"avatar_url":"https://avatars.githubusercontent.com/u/2107580?v=3","gravatar_id":"","url":"https://api.github.com/users/imanuelcostigan","html_url":"https://github.com/imanuelcostigan","followers_url":"https://api.github.com/users/imanuelcostigan/followers","following_url":"https://api.github.com/users/imanuelcostigan/following{/other_user}","gists_url":"https://api.github.com/users/imanuelcostigan/gists{/gist_id}","starred_url":"https://api.github.com/users/imanuelcostigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imanuelcostigan/subscriptions","organizations_url":"https://api.github.com/users/imanuelcostigan/orgs","repos_url":"https://api.github.com/users/imanuelcostigan/repos","events_url":"https://api.github.com/users/imanuelcostigan/events{/privacy}","received_events_url":"https://api.github.com/users/imanuelcostigan/received_events","type":"User","site_admin":false},"created_at":"2016-05-01T01:33:01Z","updated_at":"2016-05-01T01:33:01Z","body":"I am not sure what is causing the following error on `check()`:\r\n\r\n```\r\nE  checking tests\r\n   Running the tests in ‘tests/test-that.R’ failed.\r\n   Last 13 lines of output:\r\n        })\r\n     4: FUN(X[[i]], ...)\r\n     5: stop(\"Function \", name, \" not found in environment \", environmentName(env), \".\", \r\n            call. = FALSE)\r\n     \r\n     Updating collate directive in  /private/var/folders/9f/kz67r0rn3qb9tx_rmgbps94r0000gq/T/RtmpDcLHv0/testCollateOrder/DESCRIPTION \r\n     \r\n     testthat results ================================================================\r\n     OK: 364 SKIPPED: 7 FAILED: 1\r\n     1. Error: Bitbucket remote build works (@test-bitbucket.R#33) \r\n     \r\n     Error: testthat unit tests failed\r\n     Execution halted\r\n```\r\n\r\nWhen I run `test(filter = \"bit\")`, tests all run correctly."}}