From 5c62ac80f00bbd86555cf3d45714789f831130e3 Mon Sep 17 00:00:00 2001 From: Corey Frang Date: Sat, 24 Nov 2012 17:59:56 -0600 Subject: [PATCH] Adding job name for pull request jobs coming from mergeatron --- grunt.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/grunt.js b/grunt.js index 64cce4ab4..87d933344 100644 --- a/grunt.js +++ b/grunt.js @@ -126,11 +126,21 @@ module.exports = function( grunt ) { grunt.loadNpmTasks( "grunt-update-submodules" ); grunt.registerTask( "testswarm", function( commit, configFile ) { - var testswarm = require( "testswarm" ), + var jobName, + testswarm = require( "testswarm" ), testUrls = [], + pull = /PR-(\d+)/.exec( commit ), config = grunt.file.readJSON( configFile ).jquery, tests = "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue serialize support traversing Sizzle".split(" "); + if ( pull ) { + jobName = "jQuery Pull Request #" + pull[ 2 ] + ""; + } else { + jobName = "jQuery commit #" + commit.substr( 0, 10 ) + ""; + } + tests.forEach(function( test ) { testUrls.push( config.testUrl + commit + "/test/index.html?module=" + test ); }); @@ -143,7 +153,7 @@ module.exports = function( grunt ) { }, { authUsername: config.authUsername, authToken: config.authToken, - jobName: "jQuery commit #" + commit.substr( 0, 10 ) + "", + jobName: jobName, runMax: config.runMax, "runNames[]": tests, "runUrls[]": testUrls, -- 2.39.5