Skip to content

Commit 0694c4c

Browse files
author
Ilya Radchenko
committed
"cherrypick" fix for first commit
Commit should be last. This was taken from the parent repo.
1 parent 836c178 commit 0694c4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/webhooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function startFromCommit(project, payload, send){
4646
// returns : {trigger, branch, deploy}
4747
function pushJob(payload){
4848
var branchname,
49-
commit = payload.commits[0],
49+
commit = payload.commits[payload.commits.length - 1],
5050
trigger,
5151
ref;
5252

@@ -97,4 +97,4 @@ function receiveWebhook(emitter, req, res){
9797
function sendJob(job) {
9898
emitter.emit('job.prepare', job)
9999
}
100-
}
100+
}

0 commit comments

Comments
 (0)