Skip to content

Commit

Permalink
Use irc-bot v4
Browse files Browse the repository at this point in the history
  • Loading branch information
greboid committed Oct 3, 2020
1 parent ee69c66 commit 77f994b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 22 deletions.
6 changes: 3 additions & 3 deletions cmd/github/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"encoding/hex"
"flag"
"fmt"
"github.com/greboid/irc/v3/logger"
"github.com/greboid/irc/v3/plugins"
"github.com/greboid/irc/v3/rpc"
"github.com/greboid/irc-bot/v4/plugins"
"github.com/greboid/irc-bot/v4/rpc"
"github.com/greboid/irc/v4/logger"
"github.com/kouhin/envflag"
"go.uber.org/zap"
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion cmd/github/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/greboid/irc/v2/rpc"
"github.com/greboid/irc-bot/v4/rpc"
"google.golang.org/grpc"
"io/ioutil"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/github/push_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/greboid/irc/v2/rpc"
"github.com/greboid/irc-bot/v4/rpc"
"github.com/sebdah/goldie/v2"
"reflect"
"strings"
Expand Down
14 changes: 3 additions & 11 deletions cmd/github/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package main

import (
"errors"
"github.com/greboid/irc/v2/logger"
"go.uber.org/zap"
"reflect"
"testing"
"time"
Expand Down Expand Up @@ -110,10 +108,7 @@ func Test_githubWebhookHandler_handleWebhook(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt.client.finished = tt.finished
g := &githubWebhookHandler{
client: tt.client,
log: logger.CreateLogger(false),
}
g := &githubWebhookHandler{}
var bodyBytes []byte
if tt.args.filename != "" {
bodyBytes, _ = getTestDataBytes(tt.args.filename)
Expand Down Expand Up @@ -160,11 +155,8 @@ func Test_githubWebhookHandler_sendMessage(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
g := &githubWebhookHandler{
client: tt.client,
log: zap.NewNop().Sugar(),
}
got := g.sendMessage(tt.messages, false)
g := &githubWebhookHandler{}
got := g.sendMessage(false, tt.messages...)
if !reflect.DeepEqual(got, tt.wanted) {
t.Errorf("sendMessage() sent = %v, wanted %v", got, tt.wanted)
}
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module github.com/greboid/irc-github/v3
module github.com/greboid/irc-github/v4

go 1.15

require (
github.com/greboid/irc/v3 v3.0.1
github.com/greboid/irc-bot/v4 v4.0.0
github.com/greboid/irc/v4 v4.0.0
github.com/kouhin/envflag v0.0.0-20150818174321-0e9a86061649
github.com/sebdah/goldie/v2 v2.5.1
go.uber.org/zap v1.16.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/greboid/irc/v2 v2.0.3 h1:11R6FT85HszZSfQL+cCT5jGGtg+70W8r3H9lbj/IOAI=
github.com/greboid/irc/v2 v2.0.3/go.mod h1:wG5xtqTL0sBVow9LZw+16M8lZrv+D4IaywXl9H8w3qk=
github.com/greboid/irc/v3 v3.0.1 h1:aSoKDnC0P3eXaUk/OLg7QzJfBF4E47XwcLmufvllhsQ=
github.com/greboid/irc/v3 v3.0.1/go.mod h1:gnc8yyD5npBR4H2uLsPliihaT4Qhu5rtPhdQTMC3VjQ=
github.com/greboid/irc-bot/v4 v4.0.0 h1:gGU3a6D2fFvLYpOszcVAayiSiSOl3jE/4TusFkB6hHQ=
github.com/greboid/irc-bot/v4 v4.0.0/go.mod h1:ylwr4/+6zAx+KCYoP6nXhBeZ1HzE8I/qsNFZm59YBCU=
github.com/greboid/irc/v4 v4.0.0 h1:iZIwdjyCi6aGMb2WQnOsOFyZcvvHOqFDPVLbF5Y01v0=
github.com/greboid/irc/v4 v4.0.0/go.mod h1:Qb7pgbXnv57ypeRs+LoZCCZcM0ts5iUpLFRxJJyXa2g=
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 h1:FlFbCRLd5Jr4iYXZufAvgWN6Ao0JrI5chLINnUXDDr0=
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
Expand Down

0 comments on commit 77f994b

Please sign in to comment.