Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
muschellij2 committed Jun 23, 2017
1 parent 8d60e2e commit f326f68
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ importFrom(devtools,install_github)
importFrom(httr,GET)
importFrom(httr,authenticate)
importFrom(httr,content)
importFrom(httr,message_for_status)
importFrom(httr,stop_for_status)
importFrom(utils,compareVersion)
importFrom(utils,download.file)
Expand Down
5 changes: 3 additions & 2 deletions R/binary_release_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ binary_release_table = function(
cn = c("tag_name", "zipball_url", "tarball_url", "commit.sha", "commit.url")
tag_content = t(rep(NA, length = length(cn)))
colnames(tag_content) = cn
tag_content = as.data.frame(tag_content, stringsAsFactors = FALSE)
tag_content = as.data.frame(tag_content, stringsAsFactors = FALSE)
# return(NA) # there should be no releases, but there may be somehow?
}

Expand All @@ -55,7 +55,7 @@ binary_release_table = function(

# df = merge(tag_content, df, by = "tag_name", all.x = TRUE)
df = merge(tag_content, df, by = "tag_name", all = TRUE)

make_time = function(times) {
strptime(times, format = "%Y-%m-%dT%H:%M:%SZ")
}
Expand Down Expand Up @@ -94,6 +94,7 @@ binary_table_no_tags = function(

res = httr::GET(url, github_auth(pat), ...)
httr::stop_for_status(res)
httr::message_for_status(res)

##########################
# all releases
Expand Down
3 changes: 2 additions & 1 deletion R/tag_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' tag_table(repo)
#' tag_table("muschellij2/ANTsR")
#' tag_table("cran/psych@084bdd0ae2630cf31c26d97a6e13e59d3f0f66e6")
#' @importFrom httr GET content stop_for_status authenticate
#' @importFrom httr GET content stop_for_status authenticate message_for_status
#' @importFrom devtools github_pat
tag_table = function(repo, pat = NULL, ...) {
if (is.null(pat)) {
Expand All @@ -28,6 +28,7 @@ tag_table = function(repo, pat = NULL, ...) {
# args = list(url = tag_url)
tag_res = httr::GET(tag_url, github_auth(pat), ...)
httr::stop_for_status(tag_res)
httr::message_for_status(tag_res)
tag_content = httr::content(tag_res)


Expand Down

0 comments on commit f326f68

Please sign in to comment.