travis: support nox 0.0.4 arguments

This adds the "slug" arguments and also the "token" argument. The slug
argument provides the "owner_name/repo_name" format base repo to use for
the pull request. The token argument provides the GitHub presonal access
token to use for the requests to the GitHub API.
This commit is contained in:
Matthew Bauer 2016-07-04 12:32:45 -05:00
parent 95b28da353
commit 2892bbd07a

View File

@ -32,7 +32,12 @@ while test -n "$1"; do
else else
echo "=== Building pull request #$TRAVIS_PULL_REQUEST" echo "=== Building pull request #$TRAVIS_PULL_REQUEST"
nix-shell --packages nox git --run "nox-review pr $TRAVIS_PULL_REQUEST" -I nixpkgs=$TRAVIS_BUILD_DIR token=""
if [ -n "$GITHUB_TOKEN" ]; then
token="--token $GITHUB_TOKEN"
fi
nix-shell --packages nox git --run "nox-review pr --slug $TRAVIS_REPO_SLUG $token $TRAVIS_PULL_REQUEST" -I nixpkgs=$TRAVIS_BUILD_DIR
fi fi
;; ;;