diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2016-07-04 12:32:45 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2016-07-12 21:34:58 +0000 |
commit | 2892bbd07a909feb928ed5f61d1705adff4f279a (patch) | |
tree | 80be26148bca0cbdd55c4946f7bf8f6063a13d6e | |
parent | 95b28da35365c51ff1673baca9469b7f74a5bcf0 (diff) |
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-x | maintainers/scripts/travis-nox-review-pr.sh | 7 |
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 ;; |