Skip to content

Commit

Permalink
Merge pull request #51 from Spendesk/update-go-and-deps
Browse files Browse the repository at this point in the history
refactor(go/deps/module name): General update
  • Loading branch information
moutonjeremy authored Aug 29, 2022
2 parents ccd1f33 + dbddd11 commit a02f1a6
Show file tree
Hide file tree
Showing 12 changed files with 123 additions and 68 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16 as builder
FROM golang:1.18 as builder

WORKDIR /app
COPY . .
Expand Down
43 changes: 33 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
module github-actions-exporter
module github.com/spendesk/github-actions-exporter

go 1.16
go 1.18

require (
github.com/andybalholm/brotli v1.0.3 // indirect
github.com/bradleyfalzon/ghinstallation v1.1.1
github.com/die-net/lrucache v0.0.0-20220628165024-20a71bc65bf1 // indirect
github.com/fasthttp/router v1.3.9
github.com/bradleyfalzon/ghinstallation/v2 v2.1.0
github.com/die-net/lrucache v0.0.0-20220628165024-20a71bc65bf1
github.com/fasthttp/router v1.4.11
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-github/v45 v45.2.0
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/prometheus/client_golang v1.11.0
github.com/urfave/cli/v2 v2.3.0
github.com/valyala/fasthttp v1.22.0
golang.org/x/oauth2 v0.0.0-20210311163135-5366d9dc1934
github.com/prometheus/client_golang v1.13.0
github.com/urfave/cli/v2 v2.11.2
github.com/valyala/fasthttp v1.39.0
golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094
)

require (
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/golang-jwt/jwt/v4 v4.4.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/klauspost/compress v1.15.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
116 changes: 71 additions & 45 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/urfave/cli/v2"

"github-actions-exporter/pkg/config"
"github-actions-exporter/pkg/server"
"github.com/spendesk/github-actions-exporter/pkg/config"
"github.com/spendesk/github-actions-exporter/pkg/server"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion pkg/metrics/get_billable_from_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package metrics

import (
"context"
"github-actions-exporter/pkg/config"
"log"
"strconv"
"strings"
"time"

"github.com/spendesk/github-actions-exporter/pkg/config"

"github.com/google/go-github/github"
"github.com/prometheus/client_golang/prometheus"
)
Expand Down
3 changes: 2 additions & 1 deletion pkg/metrics/get_runners_enterprise_from_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package metrics

import (
"context"
"github-actions-exporter/pkg/config"
"log"
"strconv"
"time"

"github.com/spendesk/github-actions-exporter/pkg/config"

"github.com/google/go-github/v45/github"
"github.com/prometheus/client_golang/prometheus"
)
Expand Down
3 changes: 2 additions & 1 deletion pkg/metrics/get_runners_from_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package metrics

import (
"context"
"github-actions-exporter/pkg/config"
"log"
"strconv"
"strings"
"time"

"github.com/spendesk/github-actions-exporter/pkg/config"

"github.com/google/go-github/v45/github"
"github.com/prometheus/client_golang/prometheus"
)
Expand Down
3 changes: 2 additions & 1 deletion pkg/metrics/get_runners_organization_from_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package metrics

import (
"context"
"github-actions-exporter/pkg/config"
"log"
"strconv"
"time"

"github.com/spendesk/github-actions-exporter/pkg/config"

"github.com/google/go-github/v45/github"
"github.com/prometheus/client_golang/prometheus"
)
Expand Down
3 changes: 2 additions & 1 deletion pkg/metrics/get_workflow_runs_from_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package metrics

import (
"context"
"github-actions-exporter/pkg/config"
"log"
"strconv"
"strings"
"time"

"github.com/spendesk/github-actions-exporter/pkg/config"

"github.com/google/go-github/v45/github"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics/github_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/google/go-github/v45/github"

"github-actions-exporter/pkg/config"
"github.com/spendesk/github-actions-exporter/pkg/config"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package metrics
import (
"context"
"fmt"
"github-actions-exporter/pkg/config"
"log"
"net/http"
"net/url"
"strings"

"github.com/bradleyfalzon/ghinstallation"
"github.com/spendesk/github-actions-exporter/pkg/config"

"github.com/bradleyfalzon/ghinstallation/v2"
"github.com/die-net/lrucache"
"github.com/google/go-github/v45/github"
"github.com/gregjones/httpcache"
Expand Down
4 changes: 2 additions & 2 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/urfave/cli/v2"
"github.com/valyala/fasthttp"

"github-actions-exporter/pkg/config"
"github-actions-exporter/pkg/metrics"
"github.com/spendesk/github-actions-exporter/pkg/config"
"github.com/spendesk/github-actions-exporter/pkg/metrics"
)

// RunServer - run http server for expose metrics
Expand Down

0 comments on commit a02f1a6

Please sign in to comment.