You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 6, 2021. It is now read-only.
Queue state saving
Now commands writed as string instead of arrays
Removed cfg.user and very simplified code because of it
Changed project structure
Log dir now doesn't depend of log.js location
1. Create file {{name}}.json with config object in dir config/ below about this).
20
-
2. node app.js IP:PORT (IP non-required, but if you filled port only the command must looks like `node app.js :PORT`). Defaults `IP='0.0.0.0';PORT=8001`.
21
-
3. Use `http://IP:PORT/{{name}}` as hook url in github, gitlab, etc.
22
-
4. Set chmod 0777 on logs/ directory
16
+
1.`cd hook-reciever/`
17
+
2.`chmod 0777 logs/`
18
+
2. Create file `{name}.json` with config object in directory `config/` (Below about its contents).
19
+
3. run server `node app.js IP:PORT` (IP non-required, but if you filled port only the command must looks like `node app.js :PORT`). Defaults `IP="0.0.0.0";PORT=8001`.
20
+
4. Use `http://IP:PORT/{name}` as hook url in github, gitlab, etc.
23
21
24
22
Configuration:
25
23
===
26
24
It is a json file with json object inside in directory config/. This configuration used every time when hook has been recieved.
27
25
28
26
Configuration parameters:
29
27
===
30
-
*`user` - System user, from which will be performed commands
31
-
*`path` - root path for project, shell commans has been executed there
32
-
*`commands` - Shell commands, which will be performed after recieve hook
33
-
*`refs` - Non-required, if ref not match, any operation will not be performed. string or array of strings which be substituted to ref.match()
28
+
*`path` - Root path for project, shell commands has been executed here
29
+
*`commands` - Array of shell commands, which will be performed after recieve hook
30
+
*`refs` - Commits ref to match. String or array of strings which will be substituted to ref.match()
34
31
35
32
36
33
TODO
37
34
===
38
-
* Queue state persistence
39
-
* Get user id in system (id -u {cfg.user})
40
35
* Variables in command definition
41
36
* Commands string instade of array
42
-
* cfg.require parameter with applying the cfg.commands results
37
+
* cfg.require parameter - such as cfg.commands, but javascript files for inclusion
0 commit comments