The branch-listener will notify you for a new commit of your repository of the branch that you've specified.
If new commit is pushed, it will push a notification.
- Why do you need it?
- Supported Control Version Systems
- Installation and Configuration
- Uninstall
- CVS Request requirements
- License
- To do
For instance, when you are working in team and somebody updated main branch, with branch-listener you will get notification and you will be aware of it.
So you will be able pull remote changes to your working branch on time, thus there will be no any conflicts of merging your working branch to main branch.
Beforehand you start the configuration you need to provide such information for branch-listener work properly:
For git you will need provide: username, repository name and branch name you want listen to;
For bitbucket: username, app password, workspace name, repository slug and branch name.
For gitlab: project id, token and branch name;
Let's start
git clone https://github.com/KR1470R/branch-listener.git && cd branch-listener
npm i
npm run build
./branch-listener setup
After you setup branch-listener, you will be able to run it:
./branch-listener run
The branch-listener will block your attempt to run the server if you activate over-limited amount listeners.
So you have to keep on mind the CVS Request requirements before you start it.\
Here we go, now the branch-listener will notify you for every commit has been pushed.
Logs and full-working state of branch-listener you can find in ./logs/.
You may update configs manually in ./configs/, or just run ./branch-listener setup
.
If you've changed configs or source code(don't forget rebuild the project!), you must run this script:
./branch-listener restart
After you have built it, you may need run it in background and on autostartup your system.
For such purpose, you can make autorun of the branch-listener on startup system.
./autorun-setup.sh
Now, branch-listener is running on background on port 3001 or which you was specified at installation and it will be running at startup system and will notify you about new commits!
After this you will be able to use branch-listener as util.
Here is full a list of commands:
Usage: branch-listener [setup] [run] [add] [start]
[restart] [stop] [remove]
[list] [edit] [kill] [status]
[uninstall] [help] <args>
setup Setups branch-listener configs. No args needed;
run Runs Branch-listener server. No args needed;
add Adds listener for specified CVS. Second arg is name of cvs;
start Starts listeners. If args was not specified - runs all listeners,
to start specified listener you have to write cvs name of listener
as the first argument and id of the config of listener as the second;
restart Restarts branch-listener server. No args needed;
stop Stops listeners. The arguments works as well as for start command;
remove Removes listeners. The arguments works as well as for start command;
list Shows table with listeners information.
If args was not specified - shows all listeners tables.
To show specified cvs listeners you need to specify cvs name as the second arg;
edit Edits listener configs.
Example: branch-listener edit gitlab 0 token ********************;
You need to restart the branch-listener to get you changes to work as well;
kill Kills branch-listener.
Stops the branch-listener server and all listeners. No args needed;
status Outputs status of branch-listener's server. No args needed;
uninstall Uninstalls branch-listener and removes all configs and logs. No args needed;
help Shows this page. No args needed;
To uninstall branch-listener and remove all configs and settings:
branch-listener uninstall
CVS | |||
---|---|---|---|
Requests per-hour limit | 1000 | 1000 | 1000 |
Need token or app password | Yes | Yes | Yes |