Skip to content

Commit

Permalink
Migrate to telego pkg for telegram bot api
Browse files Browse the repository at this point in the history
It seems taht old telegram bot api package is no longer maintained.

Migrating bot to use telego as a new package for telegram bot api

Also rework parts of the error handling (will try to resend messages in
case of errors)

As after migration bot will send MarkdownV2 messages, it is not yet
fully tested, so might not work correctly on a long run

Related to #10
  • Loading branch information
Civil committed Oct 9, 2023
1 parent 15104a4 commit f20fe88
Show file tree
Hide file tree
Showing 653 changed files with 441,089 additions and 41,223 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
config.yaml
github2telegram
github2telegram.db
github2telegram.sqlite3
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Changes

CHANGELOG
---------
**0.1.0**
- [Code] Upgrade all dependencies to their latest version
- [Code] Migrate to a different telegram bot library


**0.0.2**
- [Improvement] Improve logging, make it more consistent
- [Improvement] Add basic validation for repo name for a `new` command
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.15-alpine AS builder
FROM golang:1.21-alpine AS builder

# Set necessary environmet variables needed for our image
ENV CGO_ENABLED=1 \
Expand Down
8 changes: 5 additions & 3 deletions configs/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ type FiltersConfig struct {
}

type NotificationConfig struct {
Token string
Url string
Type string
Type string
Token string
WebhookURL string
WebhookPath string
WebhookListenAddress string
}

type NotificationEndpoints interface {
Expand Down
6 changes: 6 additions & 0 deletions endpoints/parameters.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package endpoints

type ConfigParams struct {
Name string
Value string
}
Loading

0 comments on commit f20fe88

Please sign in to comment.