This is a simple pet project which was born because I am so lazy ass to write messages by hands
This project displays two lists of tasks from the Redmine task tracker:
- The first list includes tasks that were changed either today or last Friday (tasks worked on today).
- The second list contains all tasks except those changed today or last Friday (tasks not worked on today).
You can add any task to the list of tasks worked on yesterday or to the list of tasks to be worked on tomorrow. You can then generate a message to send to a Telegram channel.
Yep, that's pretty much it for now. Maybe in the future, I'll add some AI functionality like improving comments using AI, but that's not guaranteed at all.
You can add any task to the list of tasks worked on yesterday or to the list of tasks to be worked on tomorrow by simply pressing a button.
For each task, you can add a comment like: "Yesterday, I completed what I planned, and today I will work on what I planned."
After that, click the "Generate Message" button. You will see a preview of the message in a modal window.
To send the message to Telegram, click the button in the modal window.
This brief instruction is only for deploying the project on a local machine. If you want to use it on a web server, you'll need to deal with some domain magic. But that's a whole different journey with black jack and courtesans.
docker compose build
docker compose up -d
After that, enter the Docker container:
docker exec -it redmine_telegram_bot bash
And into docker run the command:
composer install
Add the following line to your machine's hosts file:
127.0.0.1 app.loc
- Rename the file public/src/Config.php.example to public/src/Config.php.
- Enter your credentials into the file.
In the project root directory you can change ENVIRONMENT variable value in file .env to use test or production environment. By default, value of variable ENVIRONMENT is TEST. This is means that you will get demo data. If you want to use your credentials for redmine and get real data from them - just change ENVIRONMENT into PRODUCTION
Examples: For test environment with demo data:
ENVIRONMENT=TEST
For production environment with real data
ENVIRONMENT=PRODUCTION
If everything's is ok - you can open this super-duper cool things just a visiting http://app.loc
To schedule messages, you must configure the scheduler.
Scheduled messages are stored in Memcached.
To send messages according to the schedule, you'll need to configure a CLI script (cli/messages-scheduler.php) in a cron job.
Run the following command to add your cronjob on the server:
crontab -e
Add your cronjob like this:
* * * * * /usr/local/bin/php path-to-project-on-server/public/cli/messages-scheduler.php
- Step 1: Add your bot to your Telegram channel.
- Step 2: Send any message in your Telegram channel from any client.
- Step 3: Visit https://api.telegram.org/bot<BOT_TOKEN>/getUpdates (replace <BOT_TOKEN> with your actual Telegram bot token).
- Step 4: Copy the channel_id from the response.
- All answers
- Docker Documentation
- Composer Documentation
- Redmine home page
- Redmine API Documentation
- Telegram Bot API PHP Lib Documentation
- PHP Telegram Bot Api Documentation
- Crontab guru
Login: demo
Password: demo1234
No tech support available. If something doesn't work, just use Google and the error message text :)