Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
/ branch-listener Public archive

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.

License

Notifications You must be signed in to change notification settings

KR1470R/branch-listener

Repository files navigation

branch-listener

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.

Content

  1. Why do you need it?
  2. Supported Control Version Systems
  3. Installation and Configuration
    1. Automation
  4. Uninstall
  5. CVS Request requirements
  6. License
  7. To do

Why do you need it?

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.

Supported Control Version Systems

Installation and Configuration

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;
‼️All your passwords will be stored on your local system without theft‼️ And stay encrypted.
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

⚠️⚠️⚠️Attention⚠️⚠️⚠️
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

Automation

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;

Uninstall

To uninstall branch-listener and remove all configs and settings:

branch-listener uninstall

CVS Request requirements

CVS
Requests per-hour limit 1000 1000 1000
Need token or app password Yes Yes Yes

License

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published