Skip to content

Commit

Permalink
bump go-github to current v68 (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
monsagri authored Jan 15, 2025
1 parent d218703 commit 545911a
Show file tree
Hide file tree
Showing 210 changed files with 56,441 additions and 20,812 deletions.
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ repos:
language: golang
pass_filenames: false

- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.3.3
hooks:
- id: go-unit-tests
# Run as part of GHA workflow
# - repo: https://github.com/dnephin/pre-commit-golang
# rev: v0.3.3
# hooks:
# - id: go-unit-tests

- repo: local
hooks:
Expand Down
1 change: 1 addition & 0 deletions .secrets.example.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Save as .secrets for testing with nektos/act

LD_ACCESS_TOKEN= # LaunchDarkly access token
LD_ACCESS_TOKEN_WRITER= # LaunchDarkly access token (both are used for local runs with act)
GITHUB_TOKEN= # GitHub PAT with repo access
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

### Fixed

## 2.0.2

### Changed

- Update golang version

## 2.0.1

### Changed
Expand Down
3 changes: 2 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
## Testing locally

Use [nektos/act](https://github.com/nektos/act) to run actions locally.
NB: You'll want to use the `large` runner in order to have access to all commands needed for testing.

```
act
act -e testdata/act/pull-request.json
```

_Read more: [Example commands](https://github.com/nektos/act#example-commands)_
Expand Down
3 changes: 2 additions & 1 deletion comments/comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import (

sprig "github.com/Masterminds/sprig/v3"

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

ldapi "github.com/launchdarkly/api-client-go/v15"
lcr "github.com/launchdarkly/find-code-references-in-pull-request/config"
gha "github.com/launchdarkly/find-code-references-in-pull-request/internal/github_actions"
Expand Down
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (
"strconv"
"strings"

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

"golang.org/x/oauth2"

gha "github.com/launchdarkly/find-code-references-in-pull-request/internal/github_actions"
Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/launchdarkly/find-code-references-in-pull-request

go 1.22
toolchain go1.22.5
go 1.22.0

toolchain go1.22.7

require (
github.com/Masterminds/sprig/v3 v3.3.0
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00
github.com/sourcegraph/go-diff v0.6.1
github.com/spf13/viper v1.19.0
Expand All @@ -15,6 +15,7 @@ require (
)

require (
github.com/google/go-github/v68 v68.0.0
github.com/jstemmer/go-junit-report/v2 v2.1.0
github.com/kyoh86/richgo v0.3.12
github.com/launchdarkly/ld-find-code-refs/v2 v2.13.0
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/go-github/v68 v68.0.0 h1:ZW57zeNZiXTdQ16qrDiZ0k6XucrxZ2CGmoTvcCyQG6s=
github.com/google/go-github/v68 v68.0.0/go.mod h1:K9HAUBovM2sLwM408A18h+wd9vqdLOEqTUCbnRIcx68=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
Expand Down
3 changes: 2 additions & 1 deletion internal/ldclient/flag_links.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (
"strconv"
"strings"

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

ldapi "github.com/launchdarkly/api-client-go/v15"
lcr "github.com/launchdarkly/find-code-references-in-pull-request/config"
gha "github.com/launchdarkly/find-code-references-in-pull-request/internal/github_actions"
Expand Down
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package version

const Version = "2.0.1"
const Version = "2.0.2"
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/pkg/errors"

"github.com/google/go-github/github"
"github.com/google/go-github/v68/github"
ghc "github.com/launchdarkly/find-code-references-in-pull-request/comments"
lcr "github.com/launchdarkly/find-code-references-in-pull-request/config"
ldiff "github.com/launchdarkly/find-code-references-in-pull-request/diff"
Expand Down
2 changes: 1 addition & 1 deletion testdata/act/pull-request.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pull_request": {
"number": 20,
"number": 23,
"head": {
"ref": "sample-head-ref"
},
Expand Down
2 changes: 1 addition & 1 deletion utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io"
"os"

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

// pulled from ld-find-code-refs github action
Expand Down
174 changes: 0 additions & 174 deletions vendor/github.com/google/go-github/AUTHORS

This file was deleted.

69 changes: 0 additions & 69 deletions vendor/github.com/google/go-github/github/activity.go

This file was deleted.

Loading

0 comments on commit 545911a

Please sign in to comment.