node-jenkins-api
node-jenkins-api copied to clipboard
last_result() is broken
Hi,
I'm using last_result
and have found that the generated URL is screwed up.
It works if I change the following code:
request({method: 'GET', url: build_url(last_result_url + API, jobname)}, function(error, response, body) {
to the following:
request({method: 'GET', url: last_result_url + API + jobname}, function(error, response, body) {
The reason why is because the call to build_url
fails when it util.format, as there is no %s
in the string, the host is copied into the string a second time. It seems that the last_result_url
already has the host information in it.
In my case the host is different to the value returned in the last_result. Both work, just appears to be a config problem with our jenkins due to network migrations.
I would do a pull request, but I'm not 100% clear on your logic for using build_url
.
I can second this, the URL being generated is messed up
+1
yup the url is broken :(