Skip to content

Commit

Permalink
Add link to Travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Apr 29, 2015
1 parent fec9743 commit f3b40a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inst/testscripts/comment.R
Expand Up @@ -47,7 +47,8 @@ system("git add index.html")
system("git add tables/*/*.html")
system("git add data/*/*.png")
system("git add data/*/*.log")
commit_msg <- paste0('"Pushed from https://travis-ci.org/ropensci/plotly/builds/"', a[2])
build_link <- paste0('https://travis-ci.org/ropensci/plotly/builds/', a[2])
commit_msg <- paste0('"Pushed from ', build_link, '"')
system(paste('git commit -m', commit_msg))
# This post explains how this works -- http://rmflight.github.io/posts/2014/11/travis_ci_gh_pages.html
repo <- sprintf("https://%s@github.com/ropensci/plotly-test-table.git", a[4])
Expand All @@ -59,7 +60,7 @@ system(paste("git push -q", repo, "gh-pages"))
tbl_link <- sprintf("http://ropensci.github.io/plotly-test-table/tables/%s/index.html", a[3])
msg <- sprintf("On TravisCI, commit %s was successfully merged with %s (master) to create %s. A visual testing table comparing %s with %s can be found here:\n %s",
info$head$sha, info$base$sha, a[3], info$base$sha, a[3], tbl_link)
msg <- paste("> The message below was automatically generated \n\n", msg)
msg <- paste("> The message below was automatically generated after build", build_link, "\n\n", msg)
commentz <- sprintf(paste0(base, 'issues/%s/comments'), a[1])
res <- GET(commentz, header)
warn_for_status(res)
Expand Down

0 comments on commit f3b40a7

Please sign in to comment.