Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 35f543e

Browse filesBrowse files
authored
Add generator choice
1 parent 9eab2cb commit 35f543e
Copy full SHA for 35f543e

1 file changed

+2-1Lines changed: 2 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎server.js‎

Copy file name to clipboardExpand all lines: server.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ var bodyEncrypt = {
1010
};
1111
var pem = bodyEncrypt.key.replace(/RSA PUBLIC KEY/g, 'PUBLIC KEY');
1212
var publicKey = rsa.createPublicKey(pem);
13+
var allowedBranches = {'template-api': 1, 'template-foorack-api': 1, 'template-pgerber-api': 1}
1314

1415
http.createServer(function(req, resp) {
1516
var urlParts = url.parse(req.url);
@@ -91,7 +92,7 @@ http.createServer(function(req, resp) {
9192
json: {
9293
"request": {
9394
"message": json.state + " Override the commit message: this is an api request",
94-
"branch": "template-api",
95+
"branch": allowedBranches[json.branch] ? json.branch : Object.keys(allowedBranches)[0],
9596
"config": {
9697
"env": {
9798
"global": [

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.