Skip to content

Commit 030cc1b

Browse files
author
Ilya Radchenko
committed
Merge pull request #27 from oliversalzburg/fix/privkey
Use the private key from master
2 parents 79932c5 + 90da804 commit 030cc1b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

keys.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ var path = require('path')
77
module.exports = {
88
setContext: function(context) {
99
this.branch = findBranch(context.job.project.branches, context.branch);
10+
this.branch.privkey = getMasterPrivKey(context.job.project.branches);
1011
},
1112
whatIsMyPublicKey: function() {
1213
var pubKey = this.branch.pubkey
@@ -42,3 +43,11 @@ function findBranch(branches, name) {
4243
return branch;
4344
}(name, foundBranch, branches))
4445
}
46+
47+
function getMasterPrivKey(branches) {
48+
for (var i=0; i<branches.length; i++) {
49+
if (branches[i].name === 'master') {
50+
return branches[i].privkey
51+
}
52+
}
53+
}

0 commit comments

Comments
 (0)