|  | @@ -41,9 +41,17 @@ if [ "$platform" == "linux" ]
 | 
	
		
			
				|  |  |  then
 | 
	
		
			
				|  |  |    echo "building $language on Linux"
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +  if [ "$ghprbPullId" != "" ]
 | 
	
		
			
				|  |  | +  then
 | 
	
		
			
				|  |  | +    # if we are building a pull request, grab corresponding refs.
 | 
	
		
			
				|  |  | +    FETCH_PULL_REQUEST_CMD="&& git fetch $GIT_URL +refs/pull/$ghprbPullId:refs/remotes/origin/pr/$ghprbPullId"
 | 
	
		
			
				|  |  | +  fi
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |    # Run tests inside docker
 | 
	
		
			
				|  |  |    docker run grpc/grpc_jenkins_slave bash -c -l "git clone --recursive $GIT_URL /var/local/git/grpc \
 | 
	
		
			
				|  |  | -    && cd /var/local/git/grpc && git checkout -f $GIT_COMMIT \
 | 
	
		
			
				|  |  | +    && cd /var/local/git/grpc \
 | 
	
		
			
				|  |  | +    $FETCH_PULL_REQUEST_CMD \
 | 
	
		
			
				|  |  | +    && git checkout -f $GIT_COMMIT \
 | 
	
		
			
				|  |  |      && git submodule update \
 | 
	
		
			
				|  |  |      && nvm use 0.12 \
 | 
	
		
			
				|  |  |      && rvm use ruby-2.1 \
 |