Skip to content

Commit

Permalink
Bump github.com/bradleyfalzon/ghinstallation/v2 from 2.12.0 to 2.13.0 (
Browse files Browse the repository at this point in the history
…#683)

Bumps
[github.com/bradleyfalzon/ghinstallation/v2](https://github.com/bradleyfalzon/ghinstallation)
from 2.12.0 to 2.13.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/bradleyfalzon/ghinstallation/releases">github.com/bradleyfalzon/ghinstallation/v2's
releases</a>.</em></p>
<blockquote>
<h2>v2.13.0</h2>
<h2>What's Changed</h2>
<ul>
<li>update go-github to v67 by <a
href="https://github.com/cpanato"><code>@​cpanato</code></a> in <a
href="https://redirect.github.com/bradleyfalzon/ghinstallation/pull/133">bradleyfalzon/ghinstallation#133</a></li>
<li>test/build with go1.23 by <a
href="https://github.com/cpanato"><code>@​cpanato</code></a> in <a
href="https://redirect.github.com/bradleyfalzon/ghinstallation/pull/134">bradleyfalzon/ghinstallation#134</a></li>
<li>Bump the actions group with 2 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/bradleyfalzon/ghinstallation/pull/132">bradleyfalzon/ghinstallation#132</a></li>
<li>chore(deps): bump go-github to v68 by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/bradleyfalzon/ghinstallation/pull/137">bradleyfalzon/ghinstallation#137</a></li>
<li>Bump actions/setup-go from 5.1.0 to 5.2.0 in the actions group by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/bradleyfalzon/ghinstallation/pull/136">bradleyfalzon/ghinstallation#136</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> made
their first contribution in <a
href="https://redirect.github.com/bradleyfalzon/ghinstallation/pull/137">bradleyfalzon/ghinstallation#137</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/bradleyfalzon/ghinstallation/compare/v2.12.0...v2.13.0">https://github.com/bradleyfalzon/ghinstallation/compare/v2.12.0...v2.13.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bradleyfalzon/ghinstallation/commit/e9ad86aee655f509a297a5d0c22f95df62d76797"><code>e9ad86a</code></a>
Bump actions/setup-go from 5.1.0 to 5.2.0 in the actions group</li>
<li><a
href="https://github.com/bradleyfalzon/ghinstallation/commit/3c2c4df0f2466afda9400bb5f7221ac354393c87"><code>3c2c4df</code></a>
chore(deps): bump go-github to v68</li>
<li><a
href="https://github.com/bradleyfalzon/ghinstallation/commit/20d40cc4a7b7a23915ed0bfb6158837fafb92e2f"><code>20d40cc</code></a>
Bump the actions group with 2 updates</li>
<li><a
href="https://github.com/bradleyfalzon/ghinstallation/commit/ba1b6597142ef774ef7da2d97a7a0a73b5752583"><code>ba1b659</code></a>
test/build with go1.23</li>
<li><a
href="https://github.com/bradleyfalzon/ghinstallation/commit/07f8e29cc6b60f0562818759155f589f22f34f72"><code>07f8e29</code></a>
update go-github to v67</li>
<li>See full diff in <a
href="https://github.com/bradleyfalzon/ghinstallation/compare/v2.12.0...v2.13.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/bradleyfalzon/ghinstallation/v2&package-manager=go_modules&previous-version=2.12.0&new-version=2.13.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cpanato <[email protected]>
  • Loading branch information
dependabot[bot] and cpanato authored Jan 6, 2025
1 parent 9963e72 commit 85a1f3c
Show file tree
Hide file tree
Showing 8 changed files with 271 additions and 51 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ require (
chainguard.dev/sdk v0.1.29
cloud.google.com/go/kms v1.20.4
cloud.google.com/go/secretmanager v1.14.3
github.com/bradleyfalzon/ghinstallation/v2 v2.12.0
github.com/bradleyfalzon/ghinstallation/v2 v2.13.0
github.com/chainguard-dev/clog v1.5.1
github.com/chainguard-dev/terraform-infra-common v0.6.112
github.com/cloudevents/sdk-go/v2 v2.15.2
github.com/coreos/go-oidc/v3 v3.11.0
github.com/golang-jwt/jwt/v4 v4.5.1
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v66 v66.0.0
github.com/google/go-github/v68 v68.0.0
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/kelseyhightower/envconfig v1.4.0
Expand Down
228 changes: 224 additions & 4 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/octosts/octosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/bradleyfalzon/ghinstallation/v2"
cloudevents "github.com/cloudevents/sdk-go/v2"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v68/github"
lru "github.com/hashicorp/golang-lru/v2"
expirablelru "github.com/hashicorp/golang-lru/v2/expirable"

Expand Down
18 changes: 9 additions & 9 deletions pkg/octosts/octosts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
josejwt "github.com/go-jose/go-jose/v4/jwt"
jwt "github.com/golang-jwt/jwt/v4"
"github.com/google/go-cmp/cmp"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v68/github"
"google.golang.org/grpc/metadata"

"github.com/octo-sts/app/pkg/provider"
Expand All @@ -48,9 +48,9 @@ func newFakeGitHub() *fakeGitHub {
mux := http.NewServeMux()
mux.HandleFunc("/app/installations", func(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode([]github.Installation{{
ID: github.Int64(1234),
ID: github.Ptr(int64(1234)),
Account: &github.User{
Login: github.String("org"),
Login: github.Ptr("org"),
},
}})
})
Expand All @@ -62,7 +62,7 @@ func newFakeGitHub() *fakeGitHub {
}

json.NewEncoder(w).Encode(github.InstallationToken{
Token: github.String(base64.StdEncoding.EncodeToString(b)),
Token: github.Ptr(base64.StdEncoding.EncodeToString(b)),
ExpiresAt: &github.Timestamp{Time: time.Now().Add(10 * time.Minute)},
})
})
Expand All @@ -73,9 +73,9 @@ func newFakeGitHub() *fakeGitHub {
fmt.Fprintf(io.MultiWriter(w, os.Stdout), "ReadFile failed: %v\n", err)
}
json.NewEncoder(w).Encode(github.RepositoryContent{
Content: github.String(base64.StdEncoding.EncodeToString(b)),
Type: github.String("file"),
Encoding: github.String("base64"),
Content: github.Ptr(base64.StdEncoding.EncodeToString(b)),
Type: github.Ptr("file"),
Encoding: github.Ptr("base64"),
})
})
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -140,7 +140,7 @@ func TestExchange(t *testing.T) {
want: &github.InstallationTokenOptions{
Repositories: []string{"repo"},
Permissions: &github.InstallationPermissions{
PullRequests: github.String("write"),
PullRequests: github.Ptr("write"),
},
},
},
Expand All @@ -152,7 +152,7 @@ func TestExchange(t *testing.T) {
},
want: &github.InstallationTokenOptions{
Permissions: &github.InstallationPermissions{
PullRequests: github.String("write"),
PullRequests: github.Ptr("write"),
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/octosts/trust_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"slices"

"github.com/coreos/go-oidc/v3/oidc"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v68/github"
)

type TrustPolicy struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/prober/prober.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"chainguard.dev/sdk/sts"
"github.com/chainguard-dev/clog"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v68/github"
"github.com/kelseyhightower/envconfig"
"golang.org/x/oauth2"
"google.golang.org/api/idtoken"
Expand Down Expand Up @@ -88,8 +88,8 @@ func Func(ctx context.Context) error {
if _, _, err := ghc.Issues.Create(ctx,
"octo-sts", "prober",
&github.IssueRequest{
Title: github.String("octo-sts prober was able to create an issue"),
Body: github.String("This should fail!"),
Title: github.Ptr("octo-sts prober was able to create an issue"),
Body: github.Ptr("This should fail!"),
}); err == nil {
return fmt.Errorf("expected to fail creating an issue")
}
Expand Down
12 changes: 6 additions & 6 deletions pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

"github.com/bradleyfalzon/ghinstallation/v2"
"github.com/chainguard-dev/clog"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v68/github"
"github.com/hashicorp/go-multierror"
"k8s.io/apimachinery/pkg/util/sets"
"sigs.k8s.io/yaml"
Expand Down Expand Up @@ -150,14 +150,14 @@ func (e *Validator) handleSHA(ctx context.Context, client *github.Client, owner,
opts := github.CreateCheckRunOptions{
Name: "Trust Policy Validation",
HeadSHA: sha,
ExternalID: github.String(sha),
Status: github.String("completed"),
Conclusion: github.String(conclusion),
ExternalID: github.Ptr(sha),
Status: github.Ptr("completed"),
Conclusion: github.Ptr(conclusion),
StartedAt: &github.Timestamp{Time: time.Now()},
CompletedAt: &github.Timestamp{Time: time.Now()},
Output: &github.CheckRunOutput{
Title: github.String(title),
Summary: github.String(summary),
Title: github.Ptr(title),
Summary: github.Ptr(summary),
},
}

Expand Down
50 changes: 25 additions & 25 deletions pkg/webhook/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/chainguard-dev/clog"
"github.com/chainguard-dev/clog/slogtest"
"github.com/google/go-cmp/cmp"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v68/github"
)

func TestValidatePolicy(t *testing.T) {
Expand Down Expand Up @@ -91,11 +91,11 @@ func TestOrgFilter(t *testing.T) {
t.Run(tc.org, func(t *testing.T) {
body, err := json.Marshal(github.PushEvent{
Organization: &github.Organization{
Login: github.String(tc.org),
Login: github.Ptr(tc.org),
},
Repo: &github.PushEventRepository{
Owner: &github.User{
Login: github.String(tc.org),
Login: github.Ptr(tc.org),
},
},
})
Expand Down Expand Up @@ -179,19 +179,19 @@ func TestWebhookOK(t *testing.T) {

body, err := json.Marshal(github.PushEvent{
Installation: &github.Installation{
ID: github.Int64(1111),
ID: github.Ptr(int64(1111)),
},
Organization: &github.Organization{
Login: github.String("foo"),
Login: github.Ptr("foo"),
},
Repo: &github.PushEventRepository{
Owner: &github.User{
Login: github.String("foo"),
Login: github.Ptr("foo"),
},
Name: github.String("bar"),
Name: github.Ptr("bar"),
},
Before: github.String("1234"),
After: github.String("5678"),
Before: github.Ptr("1234"),
After: github.Ptr("5678"),
})
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -219,15 +219,15 @@ func TestWebhookOK(t *testing.T) {
want := []*github.CreateCheckRunOptions{{
Name: "Trust Policy Validation",
HeadSHA: "5678",
ExternalID: github.String("5678"),
Status: github.String("completed"),
Conclusion: github.String("success"),
ExternalID: github.Ptr("5678"),
Status: github.Ptr("completed"),
Conclusion: github.Ptr("success"),
// Use time from the response to ignore it.
StartedAt: &github.Timestamp{Time: got[0].StartedAt.Time},
CompletedAt: &github.Timestamp{Time: got[0].CompletedAt.Time},
Output: &github.CheckRunOutput{
Title: github.String("Valid trust policy."),
Summary: github.String(""),
Title: github.Ptr("Valid trust policy."),
Summary: github.Ptr(""),
},
}}
if diff := cmp.Diff(want, got); diff != "" {
Expand Down Expand Up @@ -285,19 +285,19 @@ func TestWebhookDeletedSTS(t *testing.T) {

body, err := json.Marshal(github.PushEvent{
Installation: &github.Installation{
ID: github.Int64(1111),
ID: github.Ptr(int64(1111)),
},
Organization: &github.Organization{
Login: github.String("foo"),
Login: github.Ptr("foo"),
},
Repo: &github.PushEventRepository{
Owner: &github.User{
Login: github.String("foo"),
Login: github.Ptr("foo"),
},
Name: github.String("bar"),
Name: github.Ptr("bar"),
},
Before: github.String("9876"),
After: github.String("4321"),
Before: github.Ptr("9876"),
After: github.Ptr("4321"),
})
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -325,15 +325,15 @@ func TestWebhookDeletedSTS(t *testing.T) {
want := []*github.CreateCheckRunOptions{{
Name: "Trust Policy Validation",
HeadSHA: "4321",
ExternalID: github.String("4321"),
Status: github.String("completed"),
Conclusion: github.String("success"),
ExternalID: github.Ptr("4321"),
Status: github.Ptr("completed"),
Conclusion: github.Ptr("success"),
// Use time from the response to ignore it.
StartedAt: &github.Timestamp{Time: got[0].StartedAt.Time},
CompletedAt: &github.Timestamp{Time: got[0].CompletedAt.Time},
Output: &github.CheckRunOutput{
Title: github.String("Valid trust policy."),
Summary: github.String(""),
Title: github.Ptr("Valid trust policy."),
Summary: github.Ptr(""),
},
}}
if diff := cmp.Diff(want, got); diff != "" {
Expand Down

0 comments on commit 85a1f3c

Please sign in to comment.