summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2016-07-04 12:32:45 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2016-07-12 21:34:58 +0000
commit2892bbd07a909feb928ed5f61d1705adff4f279a (patch)
tree80be26148bca0cbdd55c4946f7bf8f6063a13d6e
parent95b28da35365c51ff1673baca9469b7f74a5bcf0 (diff)
downloadnixlib-2892bbd07a909feb928ed5f61d1705adff4f279a.tar
nixlib-2892bbd07a909feb928ed5f61d1705adff4f279a.tar.gz
nixlib-2892bbd07a909feb928ed5f61d1705adff4f279a.tar.bz2
nixlib-2892bbd07a909feb928ed5f61d1705adff4f279a.tar.lz
nixlib-2892bbd07a909feb928ed5f61d1705adff4f279a.tar.xz
nixlib-2892bbd07a909feb928ed5f61d1705adff4f279a.tar.zst
nixlib-2892bbd07a909feb928ed5f61d1705adff4f279a.zip
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.
-rwxr-xr-xmaintainers/scripts/travis-nox-review-pr.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/maintainers/scripts/travis-nox-review-pr.sh b/maintainers/scripts/travis-nox-review-pr.sh
index 791a50b0ae80..a992311436c5 100755
--- a/maintainers/scripts/travis-nox-review-pr.sh
+++ b/maintainers/scripts/travis-nox-review-pr.sh
@@ -32,7 +32,12 @@ while test -n "$1"; do
             else
                 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
             ;;