Commit 5c62ac80 authored by Corey Frang's avatar Corey Frang

Adding job name for pull request jobs coming from mergeatron

parent 67df705b
...@@ -126,11 +126,21 @@ module.exports = function( grunt ) { ...@@ -126,11 +126,21 @@ module.exports = function( grunt ) {
grunt.loadNpmTasks( "grunt-update-submodules" ); grunt.loadNpmTasks( "grunt-update-submodules" );
grunt.registerTask( "testswarm", function( commit, configFile ) { grunt.registerTask( "testswarm", function( commit, configFile ) {
var testswarm = require( "testswarm" ), var jobName,
testswarm = require( "testswarm" ),
testUrls = [], testUrls = [],
pull = /PR-(\d+)/.exec( commit ),
config = grunt.file.readJSON( configFile ).jquery, 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(" "); 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 <a href='https://github.com/jquery/jquery/pull/" +
pull[ 2 ] + "'>#" + pull[ 2 ] + "</a>";
} else {
jobName = "jQuery commit #<a href='https://github.com/jquery/jquery/commit/" +
commit + "'>" + commit.substr( 0, 10 ) + "</a>";
}
tests.forEach(function( test ) { tests.forEach(function( test ) {
testUrls.push( config.testUrl + commit + "/test/index.html?module=" + test ); testUrls.push( config.testUrl + commit + "/test/index.html?module=" + test );
}); });
...@@ -143,7 +153,7 @@ module.exports = function( grunt ) { ...@@ -143,7 +153,7 @@ module.exports = function( grunt ) {
}, { }, {
authUsername: config.authUsername, authUsername: config.authUsername,
authToken: config.authToken, authToken: config.authToken,
jobName: "jQuery commit #<a href='https://github.com/jquery/jquery/commit/" + commit + "'>" + commit.substr( 0, 10 ) + "</a>", jobName: jobName,
runMax: config.runMax, runMax: config.runMax,
"runNames[]": tests, "runNames[]": tests,
"runUrls[]": testUrls, "runUrls[]": testUrls,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment