{"id":16382730,"url":"https://github.com/baderouaich/gitwatcherbot","last_synced_at":"2026-05-01T09:30:20.483Z","repository":{"id":240441116,"uuid":"802552211","full_name":"baderouaich/GitWatcherBot","owner":"baderouaich","description":"Source code of the GitWatcherBot Telegram Bot - Hourly checks for new stars, forks, watchers, issues and pull requests","archived":false,"fork":false,"pushed_at":"2024-06-22T16:34:05.000Z","size":500,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-02T02:43:29.626Z","etag":null,"topics":["bot","bots","cplusplus","cpp","cpp20","cpp23","gitwatcherbot","open-source","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bot-example","telegram-bots","telegram-userbot","telegrambot","tgbot","tgbotxx"],"latest_commit_sha":null,"homepage":"https://t.me/GitWatcherBot","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baderouaich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-18T16:06:41.000Z","updated_at":"2024-09-23T21:29:25.000Z","dependencies_parsed_at":"2024-05-21T19:43:40.739Z","dependency_job_id":"36935e4d-a1f8-4c6c-a76a-98bbabb4754a","html_url":"https://github.com/baderouaich/GitWatcherBot","commit_stats":null,"previous_names":["baderouaich/gitwatcherbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baderouaich%2FGitWatcherBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baderouaich%2FGitWatcherBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baderouaich%2FGitWatcherBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baderouaich%2FGitWatcherBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baderouaich","download_url":"https://codeload.github.com/baderouaich/GitWatcherBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240073771,"owners_count":19743810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","bots","cplusplus","cpp","cpp20","cpp23","gitwatcherbot","open-source","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bot-example","telegram-bots","telegram-userbot","telegrambot","tgbot","tgbotxx"],"created_at":"2024-10-11T04:06:11.835Z","updated_at":"2026-05-01T09:30:20.455Z","avatar_url":"https://github.com/baderouaich.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![MIT License](https://img.shields.io/badge/license-MIT-yellow)](https://github.com/baderouaich/GitWatcherBot/blob/main/LICENSE)\n[![Docs](https://codedocs.xyz/doxygen/doxygen.svg)](https://baderouaich.github.io/GitWatcherBot)\n[![Language](https://img.shields.io/badge/C++-23-blue.svg?style=flat\u0026logo=c%2B%2B)](https://img.shields.io/badge/C++-23-blue.svg?style=flat\u0026logo=c%2B%2B)\n\n## Goal\nThis small project demonstrates how to create a real world Telegram Bot using C++ and [tgbotxx](https://github.com/baderouaich/tgbotxx) Telegram Bot library with SQLite3 [orm](https://github.com/fnc12/sqlite_orm) database.\n\nIt is meant to run for the long term if nothing really bad went wrong, the Bot will restart after system reboot with a [cron jobs script](./cron_jobs.sh) and carry on running.\n\nThe Bot will handle long polling errors that occur sometimes which can be caused usually by network issues, Telegram server not responding and more. It will also notify an admin when some issue occurs so it can be fixed in a sooner time.\n\nThe project also demonstrates how you can implement a middleware like function to handle users requests securely. As well as a thread pool to handle multiple user requests simultaneously. \n\nFinally, it also shows how to use a SQLite3 database to store data safely with multiple threads readers and writers, as well as database backup periodically (every hour). \n\n\n## GitWatcherBot\nA Telegram Bot that notifies you when a new change is made in your repositories (issues, pull requests, stars, forks, and watches).\n\nYou can add specific repositories to your watch list and get changes notifications.\n\n\u003cimg src=\"https://i.ibb.co/XDXV2PZ/NEW.jpg\" alt=\"Demo Image\" width=\"300\"\u003e\n\n## Run your own version of the Bot\n1. Clone the repository\n3. Acquire a new Bot token from @BotFather and store it in `res/BOT_TOKEN.txt`.\n4. Put your Telegram User ID in `res/ADMIN_USER_ID.txt` to get notifications about issues. \n      \u003e if you don't know what is your telegram user id, there are 2 ways to get it:\n      \u003e 1. Run the bot and send a message to it, then print your id in one of the callbacks such as onAnyMessage(message) { std::cout \u003c\u003c message-\u003efrom-\u003eid \u003c\u003c std::endl; }\n      \u003e 2. Open Telegram app. Then, search for “userinfobot”, click Start button and it will prompt the bot to display your user ID\n6. Build \u0026 Run your Bot detached from the console with the [build_and_run.sh](./build_and_run.sh) script\n8. Congratulations! your Bot is now running in the background. To stop your Bot, run `pkill GitWatcherBot`\n\n### Requirements\n- Linux OS (Ubuntu recommended)\n- cmake 3.20+\n- g++-11/clang++-12 and up\n- tgbotxx (will be fetched by cmake)\n- sqlite3_orm (will be fetched by cmake)\n\n### CI Status\n\n| Operating system | Build status                                                                                                                                                                                      |\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Ubuntu Debug (x64) | [![Ubuntu](https://img.shields.io/github/actions/workflow/status/baderouaich/GitWatcherBot/build-ubuntu-debug.yml?branch=main)](https://github.com/baderouaich/GitWatcherBot/actions/workflows/build-ubuntu-debug.yml)    |\n| Ubuntu Release (x64) | [![Ubuntu](https://img.shields.io/github/actions/workflow/status/baderouaich/GitWatcherBot/build-ubuntu-release.yml?branch=main)](https://github.com/baderouaich/GitWatcherBot/actions/workflows/build-ubuntu-release.yml)    |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaderouaich%2Fgitwatcherbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaderouaich%2Fgitwatcherbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaderouaich%2Fgitwatcherbot/lists"}