Skip to content

Commit 3c2517d

Browse files
committed
🔧 Add PULL_INTERVAL support
1 parent d4a6b4b commit 3c2517d

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
## Features
1818

19-
1. A pull request is created when an upstream is updated (checks hourly).
19+
1. A pull request is created when an upstream is updated (checks periodically).
2020
2. Pull requests can be automatically merged or hard reset to match upstream.
2121

2222
_Upstream must be in the same fork network_

‎index.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ const Pull = require('./lib/pull')
99
const schema = require('./lib/schema')
1010

1111
module.exports = async (robot) => {
12-
const scheduler = createScheduler(robot)
12+
const scheduler = createScheduler(robot, {
13+
delay: !process.env.DISABLE_DELAY,
14+
interval: (parseInt(process.env.PULL_INTERVAL) || 3600) * 1000
15+
})
1316

1417
robot.on('schedule.repository', routineCheck)
1518
robot.on('push', handlePush)

‎now.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"NODE_ENV": "production",
77
"LOG_LEVEL": "info",
88
"APP_ID": "12910",
9+
"PULL_INTERVAL": "120",
910
"WEBHOOK_PATH": "/webhook"
1011
},
1112
"scale": {

0 commit comments

Comments
 (0)