From f3b40a7f7844a4863780df5ffb0fe277204059a5 Mon Sep 17 00:00:00 2001 From: cpsievert Date: Tue, 28 Apr 2015 21:18:20 -0500 Subject: [PATCH] Add link to Travis build --- inst/testscripts/comment.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inst/testscripts/comment.R b/inst/testscripts/comment.R index 696ce154d5..31786439ec 100644 --- a/inst/testscripts/comment.R +++ b/inst/testscripts/comment.R @@ -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]) @@ -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)