Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devlato/gitbot
Simple self-hosted daemon that genuinely simulates daily activity on GitHub, outside of configured work hours
https://github.com/devlato/gitbot
activity fake generator gitbot github
Last synced: about 2 months ago
JSON representation
Simple self-hosted daemon that genuinely simulates daily activity on GitHub, outside of configured work hours
- Host: GitHub
- URL: https://github.com/devlato/gitbot
- Owner: devlato
- Created: 2018-12-17T22:51:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-14T00:16:07.000Z (almost 2 years ago)
- Last Synced: 2024-10-14T05:29:02.896Z (2 months ago)
- Topics: activity, fake, generator, gitbot, github
- Language: JavaScript
- Homepage:
- Size: 1.79 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fake Activity Generator
A small script to generate fake activity. Can be run as a daemon.
## Dependencies
To run this, you need Node.js (preferably, 8.12.0 LTS) and npm. To install the dependencies, run the following command:
```sh
$ npm i
```## Running the script
### Simple mode
First, create a repo for a fake activity (it might be a private repo as well). Then make sure you've added your SSH key to your GitHub account. The scripts works with SSH access only (due to running in a non-interactive mode). To start the script, you have to specify some environment variables. You can use the following command as an example setting up everything needed:
```sh
$ ORIGIN_URL=$YOUR_REPO_SSH_URL USER_NAME=$YOUR_GIT_USER_NAME USER_EMAIL=$YOUR_GIR_USER_EMAIL npm start
```If you want to set a custom timezone (i.e. if you want the script to generate the commits only for working hours in a specific timezone different from the one on the environment you run the script), please specify `TIMEZONE_OFFSET` variable as well. This variable should be assigned a number of milliseconds corresponsing to your timezone difference. I.e. for Berlin, it might be `3600000` (+1 hour).
For example, for the current repo we might have something like that:
```sh
$ [email protected]:devlato/fake-activity.git USER_NAME=devlato [email protected] TIMEZONE_OFFSET=3600000 npm start
```This command actually translates into the script call:
```sh
$ [email protected]:devlato/fake-activity.git USER_NAME=devlato [email protected] TIMEZONE_OFFSET=3600000 node ./index.js
```For the full list of supported commands, please consider reading the `package.json` file, the section called `scripts`.
However, script supports other environment variables as well, not limited to the ones listed above. To get the full list of supported environment variables, use the command:
```sh
$ npm run help
```Or just point the script directly:
```sh
$ node ./index.js help
```### Running with a supervisor
This project has a dependency of [PM2](http://pm2.keymetrics.io/) in case you want to run it with PM2. To run the script with PM2, firstly, please copy `ecosystem.config.template.js` to `ecosystem.config.js`:
```sh
$ cp ecosystem.config.template.js ecosystem.config.js
```Then edit it and specify the required environment variables there. If it looks unclear for you, please check the PM2 [documentation](http://pm2.keymetrics.io/docs/usage/environment/) for details.
After all, run the script in a supervisor mode:
```sh
$ npm run daemon
```To check the status of the running script, please type:
```sh
$ npm run ps
```To check the logs, use the following command:
```sh
$ npm run logs
```To stop the script daemon, consider typing this:
```sh
$ npm run stop # So, 'run' or 'stop'? Looks confusing, isn't it? :-)
```## Contributing
Feel free to report any issues and to send PRs.
## License
(c) 2019 devlato https://github.com/devlato
This code is available under the MIT license and is free to be modified or distributed for a non-commercial use.