bitbucket-srv-rest
Advanced tools
Comparing version
@@ -587,7 +587,9 @@ var RSVP = require('rsvp'); | ||
}; | ||
// result = SUCCESSFUL or FAILED or INPROGRESS | ||
BitbucketRest.prototype.sendBambooBuildResult = function(projKey, repoSlug,latestFromChangeset, key, result) { | ||
BitbucketRest.prototype.sendBambooBuildResult = function(projKey, repoSlug, ref, latestFromChangeset, key, result) { | ||
key = key || 'REPO-MASTER-' + new Date().getTime(); | ||
result = result || 'SUCCESSFUL' | ||
var self = this; | ||
let data = !!ref ? {ref: ref} : {} | ||
return new RSVP.Promise(function(resolve, reject) { | ||
@@ -597,3 +599,3 @@ request.post(self.baseUrl + `/rest/api/1.0/projects/${projKey}/repos/${repoSlug}/commits/${latestFromChangeset}/builds` , function(err, res, data) { | ||
resolve(); | ||
}).json({ | ||
}).json({...data, | ||
'state': result, | ||
@@ -603,2 +605,3 @@ // this is just bla bla | ||
'name': key + '-42', | ||
'ref': ref, | ||
'url': 'https://bamboo.example.com/browse/REPO-MASTER-42', | ||
@@ -610,2 +613,3 @@ 'description': 'Changes by John Doe' | ||
BitbucketRest.prototype.pullRequestSettings = function(projKey, repo, settings) { | ||
@@ -612,0 +616,0 @@ var self = this |
{ | ||
"name": "bitbucket-srv-rest", | ||
"version": "1.6.5", | ||
"version": "1.6.6", | ||
"description": "Bitbucket Server REST API Library", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
62766
0.11%698
0.29%