diff --git a/README.md b/README.md index 97b401f..158c5ff 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -[![Build Status](https://travis-ci.org/binaryplease/gitea-matrix-bot.svg?branch=master)](https://travis-ci.org/binaryplease/gitea-matrix-bot) -[![GoDoc](https://godoc.org/github.com/binaryplease/gitea-matrix-bot?status.svg)](https://godoc.org/github.com/binaryplease/gitea-matrix-bot) -[![Go Report Card](https://goreportcard.com/badge/github.com/binaryplease/gitea-matrix-bot)](https://goreportcard.com/report/github.com/binaryplease/gitea-matrix-bot) -[![codecov](https://codecov.io/gh/binaryplease/gitea-matrix-bot/branch/master/graph/badge.svg)](https://codecov.io/gh/binaryplease/gitea-matrix-bot) +[![Build Status](https://travis-ci.org/pinpox/gitea-matrix-bot.svg?branch=master)](https://travis-ci.org/pinpox/gitea-matrix-bot) +[![GoDoc](https://godoc.org/github.com/pinpox/gitea-matrix-bot?status.svg)](https://godoc.org/github.com/pinpox/gitea-matrix-bot) +[![Go Report Card](https://goreportcard.com/badge/github.com/pinpox/gitea-matrix-bot)](https://goreportcard.com/report/github.com/pinpox/gitea-matrix-bot) +[![codecov](https://codecov.io/gh/pinpox/gitea-matrix-bot/branch/master/graph/badge.svg)](https://codecov.io/gh/pinpox/gitea-matrix-bot) ![Matrix](https://img.shields.io/matrix/gitea-matrix-bot:matrix.org.svg?label=%23gitea-matrix-bot%3Amatrix.org) # gitea-matrix-bot A bot to listen for [gitea](https://gitea.io) webhooks and post to a [matrix](https://matrix.org) channel
- +
-This bot was build using my [bot framework](https://github.com/binaryplease/matrix-bot/). If you stumble upon bugs on any of them please let me know! +This bot was build using my [bot framework](https://github.com/pinpox/matrix-bot/). If you stumble upon bugs on any of them please let me know! ##### Status diff --git a/flake.nix b/flake.nix index 5168fe9..5d99da9 100644 --- a/flake.nix +++ b/flake.nix @@ -32,7 +32,7 @@ version = "master"; src = ./.; vendorSha256 = - "sha256-Kce1ky4orC8pPSEUAbOeW/O2S4ThtOLdYIPaXfKGHA4="; + "sha256-4g/pUJ0gGYj6Y3rDINZBbcrEwloA5QCLdviECB1QrIQ="; # TODO fix tests doCheck = false; diff --git a/giteabot.go b/giteabot.go index 0b82623..bdac49c 100644 --- a/giteabot.go +++ b/giteabot.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - matrixbot "github.com/binaryplease/matrix-bot" + matrixbot "github.com/pinpox/matrix-bot" log "github.com/sirupsen/logrus" ) @@ -20,10 +20,11 @@ type GiteaBot struct { // NewGiteaBot creates a new bot form user credentials func NewGiteaBot(user, pass, host string, DBPath string) *GiteaBot { + log.Info("Creating bot") bot, err := matrixbot.NewMatrixBot(user, pass, host, "gitea") if err != nil { - log.Fatal(err) + log.Fatal("Failed to create bot", err) } db := NewGiteaDB(DBPath) diff --git a/go.mod b/go.mod index a80ae6f..d1c998a 100644 --- a/go.mod +++ b/go.mod @@ -4,9 +4,9 @@ go 1.20 require ( github.com/alecthomas/kingpin/v2 v2.3.2 - github.com/binaryplease/matrix-bot v0.0.0-20190422182545-e58f16f86ca7 github.com/go-ini/ini v1.67.0 github.com/mattn/go-sqlite3 v1.14.17 + github.com/pinpox/matrix-bot v0.0.0-20190422182545-e58f16f86ca7 github.com/sirupsen/logrus v1.9.3 ) diff --git a/go.sum b/go.sum index 3ce99df..2246e37 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,6 @@ github.com/alecthomas/kingpin/v2 v2.3.2 h1:H0aULhgmSzN8xQ3nX1uxtdlTHYoPLu5AhHxWr github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/binaryplease/matrix-bot v0.0.0-20190422182545-e58f16f86ca7 h1:DaAe5WJc6OZlwBICe1nXU2qqZZ3Pfo8ueQKjz+UE5ls= -github.com/binaryplease/matrix-bot v0.0.0-20190422182545-e58f16f86ca7/go.mod h1:OoTSJ08SgAIAZFhlnq7/yx3QFUwlZChDCV5LTREdtMc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -13,6 +11,8 @@ github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530 h1:kHKxCOLcHH8 github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530/go.mod h1:/gBX06Kw0exX1HrwmoBibFA98yBk/jxKpGVeyQbff+s= github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/pinpox/matrix-bot v0.0.0-20190422182545-e58f16f86ca7 h1:XHreELSalICD7W0epPMaipBJNavXLYMnKoF3HlHdsRw= +github.com/pinpox/matrix-bot v0.0.0-20190422182545-e58f16f86ca7/go.mod h1:7Rr0lMai8JyXMw8rlLclHmIX0+Lf7GJcfEL4R9/Wtk4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= diff --git a/main.go b/main.go index 683924b..b942452 100644 --- a/main.go +++ b/main.go @@ -48,7 +48,7 @@ func init() { matrixUser := cfg.Section("matrix").Key("matrix_user").String() matrixPass := cfg.Section("matrix").Key("matrix_pass").String() - matrixHost := cfg.Section("matrix").Key("matrix_pass").String() + matrixHost := cfg.Section("matrix").Key("matrix_host").String() dbPath := cfg.Section("bot").Key("db_path").String() //Set up the bot