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,