Skip to content

Commit a8e5b07

Browse files
authored
Merge pull request gitana#17 from tenoriojuann/feature/startValidation
Adds new method (startValidation)
2 parents b615a9c + acb256c commit a8e5b07

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gitana",
33
"description": "Gitana JavaScript Driver for Cloud CMS",
4-
"version": "1.0.305",
4+
"version": "1.0.307",
55
"main": "dist/gitana.js",
66
"license": "Apache-2.0",
77
"keywords": [

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gitana",
3-
"version": "1.0.305",
3+
"version": "1.0.307",
44
"main": [
55
"dist/gitana.js"
66
],

js/gitana/repository/Branch.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,35 @@
15781578
return this.getUri() + "/history/start";
15791579
};
15801580

1581+
return this.chainPostResponse(this, uriFunction, params).then(function(response) {
1582+
1583+
var jobId = response._doc;
1584+
1585+
callback(jobId);
1586+
});
1587+
},
1588+
1589+
/**
1590+
* Starts the branch validation job (looking for issues with relator mappings)
1591+
*
1592+
* @public
1593+
*
1594+
* @param repair {boolean}
1595+
* @param callback {function}
1596+
*/
1597+
startValidation: function(repair, callback)
1598+
{
1599+
var params = {};
1600+
1601+
if(repair){
1602+
params.repair = repair;
1603+
}
1604+
1605+
var uriFunction = function()
1606+
{
1607+
return this.getUri() + "/validate/start";
1608+
};
1609+
15811610
return this.chainPostResponse(this, uriFunction, params).then(function(response) {
15821611

15831612
var jobId = response._doc;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gitanajs",
3-
"version": "1.0.306",
3+
"version": "1.0.307",
44
"repository": {
55
"type": "git",
66
"url": "git://github.com/gitana/gitana-javascript-driver.git"

0 commit comments

Comments
 (0)