Skip to content

Commit

Permalink
Move to gitlab.com/slxh/matrix/alertmanager_matrix and update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
silkeh committed Oct 15, 2023
1 parent 08b9590 commit 1f38fd9
Show file tree
Hide file tree
Showing 9 changed files with 229 additions and 494 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- project: silkeh/pipelines
- project: slxh/pipelines
file:
- golang.gitlab-ci.yml
- builds/docker-buildx.gitlab-ci.yml
Expand Down
32 changes: 24 additions & 8 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@ run:
linters:
enable-all: true
disable:
- testpackage # tests are allowed in the same package
- tagliatelle # json schema of Matrix specs is followed
- exhaustruct # structs may be uninitialized
- nlreturn # covered by wsl cuddle rules
- paralleltest # tests are acceptable in sequence
- nakedret # naked returns are acceptable
- nonamedreturns # named returns are acceptable
- goimports # conflicts with GCI
- depguard # this project only has dependencies in the standard library
- nonamedreturns # named returns are acceptable in short functions
# deprecated
- exhaustivestruct
- scopelint
- interfacer
- maligned
- golint
- exhaustivestruct
- structcheck
- varcheck
- deadcode
- nosnakecase
- ifshort

severity:
default-severity: major
Expand All @@ -31,6 +35,10 @@ issues:
- path: _test\.go
linters:
- gochecknoglobals
- errcheck
- wrapcheck
- gosec
- goerr113

linters-settings:
varnamelen:
Expand All @@ -40,7 +48,15 @@ linters-settings:
sections:
- standard
- default
- prefix(github.com/silkeh/alertmanager_matrix)
- prefix(gitlab.com/slxh/matrix/alertmanager_matrix)

gomnd:
ignored-numbers:
- '8'
- '16'
- '32'
- '64'
- '10'

gosec:
excludes:
Expand All @@ -52,8 +68,8 @@ linters-settings:
- fieldalignment # misalignment is accepted

revive:
rules: # see https://github.com/mgechev/revive#recommended-configuration
- name: exported
enable-all-rules: false
rules: # see https://github.com/mgechev/revive#recommended-configuration
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ The icons and colors define the behaviour of the built-in `icon` and `color` tem
They can be configured by providing a YAML file using `-icon-file` and `-color-file` respectively.
See [the documentation][variables] for the default values.

[constants]: https://pkg.go.dev/github.com/silkeh/alertmanager_matrix/bot#pkg-constants
[variables]: https://pkg.go.dev/github.com/silkeh/alertmanager_matrix/bot#pkg-variables
[constants]: https://pkg.go.dev/gitlab.com/slxh/matrix/alertmanager_matrix/bot#pkg-constants
[variables]: https://pkg.go.dev/gitlab.com/slxh/matrix/alertmanager_matrix/bot#pkg-variables
4 changes: 2 additions & 2 deletions cmd/alertmanager_matrix/alertmanager_matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/gorilla/mux"
"gopkg.in/yaml.v3"

"github.com/silkeh/alertmanager_matrix/pkg/alertmanager"
bot2 "github.com/silkeh/alertmanager_matrix/pkg/bot"
"gitlab.com/slxh/matrix/alertmanager_matrix/pkg/alertmanager"
bot2 "gitlab.com/slxh/matrix/alertmanager_matrix/pkg/bot"
)

func requestHandler(client *bot2.Client, alertLabels bool, w http.ResponseWriter, r *http.Request) {
Expand Down
29 changes: 20 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
module github.com/silkeh/alertmanager_matrix
module gitlab.com/slxh/matrix/alertmanager_matrix

go 1.17
go 1.19

require (
github.com/gorilla/mux v1.8.0
github.com/prometheus/alertmanager v0.25.1
github.com/prometheus/alertmanager v0.23.0
github.com/prometheus/client_golang v1.14.0
gitlab.com/silkeh/matrix-bot v0.1.0
gitlab.com/slxh/matrix/bot v0.2.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/aws/aws-sdk-go v1.40.11 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/go-kit/log v0.2.0 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.38.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/common/sigv4 v0.1.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit 1f38fd9

Please sign in to comment.