Skip to content
This repository was archived by the owner on Feb 19, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/push-build-test-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Build & Test
uses: parkr/actions/docker-make@main
with:
Expand Down
2 changes: 1 addition & 1 deletion affinity/affinity.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"strings"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
)

Expand Down
2 changes: 1 addition & 1 deletion affinity/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package affinity
import (
"fmt"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
)

Expand Down
2 changes: 1 addition & 1 deletion affinity/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math/rand"
"time"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
)

Expand Down
2 changes: 1 addition & 1 deletion affinity/team_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package affinity
import (
"testing"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"log"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
)

Expand Down Expand Up @@ -70,7 +70,7 @@ func (auth authenticator) teamHasPushAccess(teamId int64, owner, repo string) bo
}
teamHasPushAccessCache[cacheKey] = repository
}
permissions := *teamHasPushAccessCache[cacheKey].Permissions
permissions := teamHasPushAccessCache[cacheKey].Permissions
return permissions["push"] || permissions["admin"]
}

Expand Down
2 changes: 1 addition & 1 deletion autopull/autopull.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"strings"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
)

Expand Down
2 changes: 1 addition & 1 deletion chlog/close_milestone_on_release.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package chlog

import (
"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
)

Expand Down
2 changes: 1 addition & 1 deletion chlog/create_release_on_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"regexp"
"strings"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
)

Expand Down
2 changes: 1 addition & 1 deletion chlog/merge_and_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"sync"
"text/template"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/auth"
"github.com/parkr/auto-reply/ctx"
"github.com/parkr/changelog"
Expand Down
2 changes: 1 addition & 1 deletion cmd/freeze-ancient-issues/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"sync"
"time"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
"github.com/parkr/auto-reply/freeze"
"github.com/parkr/auto-reply/sentry"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
"github.com/parkr/auto-reply/sentry"
"github.com/parkr/auto-reply/stale"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nudge-maintainers-to-release/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"time"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
"github.com/parkr/auto-reply/jekyll"
"github.com/parkr/auto-reply/releases"
Expand Down
2 changes: 1 addition & 1 deletion cmd/unearth/unearth.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"strings"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/unify-labels/unify_labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"strings"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
"github.com/parkr/auto-reply/freeze"
"github.com/parkr/auto-reply/sentry"
Expand Down Expand Up @@ -127,7 +127,7 @@ func main() {

context := ctx.NewDefaultContext()

log.SetPrefix("freeze-ancient-issues: ")
log.SetPrefix("unify-lables: ")

sentryClient, err := sentry.NewClient(map[string]string{
"app": "unify-labels",
Expand Down
2 changes: 1 addition & 1 deletion common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"net/http"

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

func SliceLookup(data []string) map[string]bool {
Expand Down
2 changes: 1 addition & 1 deletion common/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"testing"

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

func TestErrorFromResponse(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions ctx/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"fmt"
"log"

"github.com/DataDog/datadog-go/statsd"
"github.com/google/go-github/github"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/google/go-github/v42/github"
)

type Context struct {
Expand Down
2 changes: 1 addition & 1 deletion ctx/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"
"os"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"golang.org/x/oauth2"
)

Expand Down
10 changes: 6 additions & 4 deletions ctx/statsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ctx
import (
"log"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
)

var (
Expand All @@ -13,12 +13,14 @@ var (
)

func NewStatsd() *statsd.Client {
client, err := statsd.New(hostport)
client, err := statsd.New(
hostport,
statsd.WithNamespace(namespace),
)
if err != nil {
log.Fatal(err)
return nil
}
client.Namespace = namespace
return client
}

Expand All @@ -28,6 +30,6 @@ func (c *Context) IncrStat(name string, tags []string) {

func (c *Context) CountStat(name string, value int64, tags []string) {
if c.Statsd != nil {
c.Statsd.Count(name, value, tags, countRate)
_ = c.Statsd.Count(name, value, tags, countRate)
}
}
2 changes: 1 addition & 1 deletion dependencies/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
"github.com/parkr/auto-reply/search"
"github.com/parkr/githubapi/githubsearch"
Expand Down
6 changes: 4 additions & 2 deletions freeze/freeze.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/google/go-github/github"
"github.com/google/go-github/v42/github"
"github.com/parkr/auto-reply/ctx"
)

Expand Down Expand Up @@ -34,7 +34,9 @@ func AllTooOldIssues(context *ctx.Context, owner, repo string) ([]github.Issue,
return issues, nil
}

issues = append(issues, result.Issues...)
for _, issue := range result.Issues {
issues = append(issues, *issue)
}

if resp.NextPage == 0 {
break
Expand Down
43 changes: 27 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
module github.com/parkr/auto-reply

go 1.14
go 1.17

require (
github.com/DataDog/datadog-go v0.0.0-20180330214955-e67964b4021a
github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/DataDog/datadog-go/v5 v5.0.2
github.com/getsentry/raven-go v0.2.0
github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v1.0.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/google/go-github/v42 v42.0.0
github.com/hashicorp/go-version v1.4.0
github.com/heroku/x v0.0.0-20181101225318-084eff478eb7
github.com/jekyll/dashboard v0.0.0-20181102184910-a67d1fab1794
github.com/parkr/changelog v0.0.0-20160308230713-cef0141074f9
github.com/parkr/githubapi v0.0.0-20171101210150-a4a24abadc26
github.com/pkg/errors v0.8.0 // indirect
github.com/heroku/x v0.0.47
github.com/jekyll/dashboard v0.0.0-20220131044553-ac5a25a7b37f
github.com/parkr/changelog v1.0.0
github.com/parkr/githubapi v0.0.0-20200620215716-99ee55fce6df
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc // indirect
golang.org/x/oauth2 v0.0.0-20181102170140-232e45548389
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
google.golang.org/appengine v1.3.0 // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
)

require (
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-github/v37 v37.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect
golang.org/x/sys v0.0.0-20211102061401-a2f17f7b995c // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
)
Loading