analyticalmonk / Rperform

:bar_chart: R package for tracking performance metrics across git versions and branches.
https://analyticalmonk.github.io/Rperform
GNU General Public License v3.0
65 stars 9 forks source link

PRs from a different user? #2

Closed tdhock closed 9 years ago

tdhock commented 9 years ago

how to get a list of commits when the PR comes from a different user?

for example https://github.com/tdhock/animint/pull/78

tdhock commented 9 years ago

travis environment variables http://docs.travis-ci.com/user/environment-variables/

tdhock commented 9 years ago

TRAVIS_BRANCH: For builds not triggered by a pull request this is the name of the branch currently being built; whereas for builds triggered by a pull request this is the name of the branch targeted by the pull request (in many cases this will be master).

tdhock commented 9 years ago

TRAVIS_PULL_REQUEST: The pull request number if the current job is a pull request, “false” if it’s not a pull request.

tdhock commented 9 years ago

TRAVIS_REPO_SLUG: The slug (in form: owner_name/repo_name) of the repository currently being built. (for example, “travis-ci/travis-build”).

tdhock commented 9 years ago

say that you submit a PR from da-ta-vinci21/stringr@some_branch to hadley/stringr@master

TRAVIS_PULL_REQUEST=128 (some number) TRAVIS_BRANCH=some_branch TRAVIS_REPO_SLUG=da-ta-vinci21/stringr

question: how to determine hadley/stringr@master (target of PR)?

tdhock commented 9 years ago

if you can't figure it out post an issue to Travis https://github.com/travis-ci/travis-ci/issues/new

analyticalmonk commented 9 years ago

I was going through the travis docs and came across this: Security Restrictions when testing Pull Requests. It mentions how the secure or encrypted environment variables won't be available when building a PR from a fork of the repository. That means a PR build won't have access to the encrypted github token which is used to push to the github page. Even if we were to figure out a way to determine the target of PR, it won't do us any good since we won't be able to update the gh-page!

tdhock commented 9 years ago

ok that makes sense.

in that case I guess it is OK to only support PRs from the same repos.