-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
35 lines (21 loc) · 1.58 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const { AutoPull } = require('./util')
/*
EXAMPLES
########## FOR PRIVATE REPOSITORIES ##########
new AutoPull("repoAccount", "repoName", "projectPath", int pullInterval (in seconds), function() {...} (execute code when files are updated)).auth("username", "password").start()
new AutoPull("repoAccount", "repoName", "projectPath", int pullInterval (in seconds), function() {...} (execute code when files are updated)).oauth("oauthtoken").start()
new AutoPull("repoAccount", "repoName", "projectPath", int pullInterval (in seconds), function() {...} (execute code when files are updated)).auth("username", "password").withBranch("branchName").start()
new AutoPull("repoAccount", "repoName", "projectPath", int pullInterval (in seconds), function() {...} (execute code when files are updated)).oauth("oauthtoken").withBranch("branchName").start()
########## FOR PUBLIC REPOSITORIES ##########
new AutoPull("repoAccount", "repoName", "projectPath", int pullInterval (in seconds), function() {...} (execute code when files are updated)).start()
new AutoPull("repoAccount", "repoName", "projectPath", int pullInterval (in seconds), function() {...} (execute code when files are updated)).withBranch("branchName").start()
########## STOP ##########
const pull = new AutoPull(...)
pull.stop()
########## EXECUTE CODE ##########
new AutoPull(...).withExec("command").start()
########## DISABLE GIT LOG ##########
new AutoPull(...).disableGitLogs()
You can also use global variables for authentication, but i let you do that yourself :)
*/
new AutoPull("MohistMC", "Mohist", "path", 5).withBranch("1.16.5").start()