Skip to content

Commit cf8fad6

Browse files
committed
Fix some stuff
1 parent f1da678 commit cf8fad6

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

now.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,9 @@ const { createProbot } = require("probot");
33
const { findPrivateKey } = require("probot/lib/private-key");
44
const appFn = require("./");
55

6-
process.env.PRIVATE_KEY =
7-
process.env.NOW_GITHUB_COMMIT_REF === "master"
8-
? process.env.PROD_PRIVATE_KEY
9-
: process.env.DEV_PRIVATE_KEY;
10-
116
const options = {
12-
id:
13-
process.env.NOW_GITHUB_COMMIT_REF === "master"
14-
? process.env.PROD_APP_ID
15-
: process.env.DEV_APP_ID,
16-
secret:
17-
process.env.NOW_GITHUB_COMMIT_REF === "master"
18-
? process.env.PROD_WEBHOOK_SECRET
19-
: process.env.DEV_WEBHOOK_SECRET,
7+
id: process.env.APP_ID,
8+
secret: process.env.WEBHOOK_SECRET,
209
cert: findPrivateKey()
2110
};
2211

now.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
"version": 2,
33
"scope": "changesets",
44
"env": {
5-
"PROD_APP_ID": "@prod-app-id",
6-
"PROD_WEBHOOK_SECRET": "@prod-webhook-secret",
7-
"PROD_PRIVATE_KEY": "@prod-private-key-base64-encoded",
8-
"DEV_APP_ID": "@dev-app-id",
9-
"DEV_WEBHOOK_SECRET": "@dev-webhook-secret",
10-
"DEV_PRIVATE_KEY": "@dev-private-key-base64-encoded"
5+
"APP_ID": "@dev-app-id",
6+
"WEBHOOK_SECRET": "@dev-webhook-secret",
7+
"PRIVATE_KEY": "@dev-private-key-base64-encoded"
118
},
129
"builds": [{ "src": "now.js", "use": "@now/node" }],
1310
"routes": [{ "src": "/", "dest": "/now.js" }]

0 commit comments

Comments
 (0)