diff --git a/.github/workflows/bump-and-release.yml b/.github/workflows/bump-and-release.yml index ea93badd..4766a108 100644 --- a/.github/workflows/bump-and-release.yml +++ b/.github/workflows/bump-and-release.yml @@ -18,7 +18,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.CI_PERSONAL_ACCESS_TOKEN }} DEFAULT_BUMP: patch WITH_V: true - - uses: actions/setup-go@v2.1.3 + - uses: actions/setup-go@v2.1.4 with: go-version: 1.15 - name: Create a Tripbot release diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f4f851f8..3567f26c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -122,6 +122,6 @@ jobs: env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} VERSION_TAG: ${{ steps.get-version.outputs.version }} - uses: Ilshidur/action-discord@0.3.0 + uses: Ilshidur/action-discord@0.3.2 with: args: 'New Docker image created for [{{ EVENT_PAYLOAD.repository.full_name }}]({{ EVENT_PAYLOAD.repository.html_url }}): [{{ VERSION_TAG }}]({{ EVENT_PAYLOAD.compare }})' diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 3f37b8af..175bd651 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: golint - uses: reviewdog/action-golangci-lint@v1 + uses: reviewdog/action-golangci-lint@v2.0.1 with: github_token: ${{ secrets.github_token }} golangci_lint_flags: "--disable-all -E golint" @@ -26,7 +26,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: errcheck - uses: reviewdog/action-golangci-lint@v1 + uses: reviewdog/action-golangci-lint@v2.0.1 with: github_token: ${{ secrets.github_token }} golangci_lint_flags: "--disable-all -E errcheck" diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 0b47c71e..0530245c 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: run-linters - uses: github/super-linter@v4.2.2 + uses: github/super-linter@v4.5.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # disabled because it's not working with C libs diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index f0b295bd..bc75fd85 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Install Golang - uses: actions/setup-go@v2.1.3 + uses: actions/setup-go@v2.1.4 with: go-version: ${{ matrix.go-version }} - uses: actions/checkout@v2 diff --git a/go.mod b/go.mod index 717063d7..13762fec 100644 --- a/go.mod +++ b/go.mod @@ -8,14 +8,13 @@ require ( github.com/bradfitz/latlong v0.0.0-20170410180902-f3db6d0dff40 github.com/davecgh/go-spew v1.1.1 github.com/dimiro1/banner v1.1.0 - github.com/gempir/go-twitch-irc/v2 v2.5.0 + github.com/gempir/go-twitch-irc/v2 v2.6.0 github.com/getsentry/sentry-go v0.11.0 - github.com/go-sql-driver/mysql v1.5.0 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/gorilla/mux v1.8.0 github.com/gorilla/schema v1.2.0 // indirect github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026 - github.com/jmoiron/sqlx v1.2.0 + github.com/jmoiron/sqlx v1.3.4 github.com/joho/godotenv v1.3.0 github.com/jonas-p/go-shp v0.1.1 // indirect github.com/kelseyhightower/envconfig v1.4.0 @@ -25,7 +24,7 @@ require ( github.com/mattn/go-colorable v0.1.8 // indirect github.com/mitchellh/go-ps v1.0.0 github.com/nathan-osman/go-sunrise v0.0.0-20201029015502-9a83cd1a5746 - github.com/nicklaw5/helix v1.20.0 + github.com/nicklaw5/helix v1.24.4 github.com/prometheus/client_golang v1.10.0 github.com/robfig/cron v1.2.0 github.com/sfreiberg/gotwilio v0.0.0-20200916182813-169c4cd5c691 diff --git a/go.sum b/go.sum index f011e158..61f28635 100644 --- a/go.sum +++ b/go.sum @@ -139,8 +139,8 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/gempir/go-twitch-irc/v2 v2.5.0 h1:aybXNoyDNQaa4vHhXb0UpIDmspqutQUmXIYUFsjgecU= -github.com/gempir/go-twitch-irc/v2 v2.5.0/go.mod h1:120d2SdlRYg8tRnZwsyNPeS+mWPn+YmNEzB7Bv/CDGE= +github.com/gempir/go-twitch-irc/v2 v2.6.0 h1:pgO9g2RV9kBo+iK4OkCAc16gVG+p4uRX/O0bhqP0ibw= +github.com/gempir/go-twitch-irc/v2 v2.6.0/go.mod h1:120d2SdlRYg8tRnZwsyNPeS+mWPn+YmNEzB7Bv/CDGE= github.com/getsentry/sentry-go v0.11.0 h1:qro8uttJGvNAMr5CLcFI9CHR0aDzXl0Vs3Pmw/oTPg8= github.com/getsentry/sentry-go v0.11.0/go.mod h1:KBQIxiZAetw62Cj8Ri964vAEWVdgfaUCn30Q3bCvANo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -305,8 +305,8 @@ github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7Ua github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/jmoiron/sqlx v1.3.4 h1:wv+0IJZfL5z0uZoUjlpKgHkgaFSYD+r9CfrXjEXsO7w= +github.com/jmoiron/sqlx v1.3.4/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonas-p/go-shp v0.1.1 h1:LY81nN67DBCz6VNFn2kS64CjmnDo9IP8rmSkTvhO9jE= @@ -355,7 +355,7 @@ github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvf github.com/labstack/echo/v4 v4.1.17/go.mod h1:Tn2yRQL/UclUalpb5rPdXDevbkJ+lp/2svdyFBg6CHQ= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.1 h1:6VXZrLU0jHBYyAqrSPa+MgPfnSvTPuMgK+k0o5kVFWo= github.com/lib/pq v1.10.1/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -379,8 +379,8 @@ github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcME github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-sqlite3 v1.9.0 h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= +github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -413,8 +413,8 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nicklaw5/helix v1.20.0 h1:qC76FVxeOOcqOJD2JijV97O37Wc3gqi9w1EUBLWFFFs= -github.com/nicklaw5/helix v1.20.0/go.mod h1:XeeXY7oY5W+MVMu6wF4qGm8uvjZ1/Nss0FqprVkXKrg= +github.com/nicklaw5/helix v1.24.4 h1:Ab2nEOwHxiSxnND2ZdZXp2nbpLW2tKjjERlusbsUfwo= +github.com/nicklaw5/helix v1.24.4/go.mod h1:XeeXY7oY5W+MVMu6wF4qGm8uvjZ1/Nss0FqprVkXKrg= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= diff --git a/infra/docker/docker-compose.production.yml b/infra/docker/docker-compose.production.yml index 7d888ce8..ec880334 100644 --- a/infra/docker/docker-compose.production.yml +++ b/infra/docker/docker-compose.production.yml @@ -7,8 +7,14 @@ services: GOOGLE_APPLICATION_CREDENTIALS: /opt/tripbot/infra/google/tripbot-prod.json DISABLE_TWITCH_WEBHOOKS: "false" ports: - - "8080:8080" + # matching the port in the twitch oauth app + - "4569:8080" env_file: - ./.env.production - depends_on: {} + depends_on: [] restart: always + + db: + deploy: + # don't use a db in prod + replicas: 0 diff --git a/infra/docker/tripbot/Dockerfile b/infra/docker/tripbot/Dockerfile index da1eda7a..9594d72c 100644 --- a/infra/docker/tripbot/Dockerfile +++ b/infra/docker/tripbot/Dockerfile @@ -1,5 +1,5 @@ # buster is the debian release, c.p. https://askubuntu.com/a/445496 -FROM golang:1.16.5-buster +FROM golang:1.17.0-buster WORKDIR /go/src/github.com/adanalife/tripbot diff --git a/pkg/config/tripbot/helpers.go b/pkg/config/tripbot/helpers.go index 76cc2d7e..7291c210 100644 --- a/pkg/config/tripbot/helpers.go +++ b/pkg/config/tripbot/helpers.go @@ -45,6 +45,7 @@ var IgnoredUsers = []string{ "2020", "abbottcostello", "academyimpossible", + "aiexiaxo", "angeloflight", "anotherttvviewer", "apricotdrupefruit", @@ -105,20 +106,27 @@ var IgnoredUsers = []string{ "minion619", "mrreflector", "mslenity", + "music_and_arts", "n3td3v", "nerdydreams", "nightbot", "nuclearpigeons", "p0lizei_", + "phantom_309", "playacted", "prankcher", + "quavered", "rladmsdb88", + "rogueg1rl", "rubberslayer", "sad_grl", "saddestkitty", + "seiiaaa", "shadowy_stix", "sillygnome225", "slocool", + "smallsteramersdcserver", + "smallstreamersdcserver", "stickypigs", "stormmunity", "streamlabs",