Skip to content

Commit

Permalink
major(deps): update module github.com/google/go-github/v66 to v67 (#102)
Browse files Browse the repository at this point in the history
* major(deps): update module github.com/google/go-github/v66 to v67

* feat: add support for repository_ruleset events

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: cbrgm <[email protected]>
  • Loading branch information
renovate[bot] and cbrgm authored Dec 3, 2024
1 parent 7ebd533 commit 2407e46
Show file tree
Hide file tree
Showing 110 changed files with 1,746 additions and 129 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ package main
import (
"fmt"
"github.com/cbrgm/githubevents/githubevents"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"net/http"
)

Expand Down Expand Up @@ -242,6 +242,8 @@ handle.OnError(

* ***[repository](https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#repository)***

* ***[repository_ruleset](https://docs.github.com/en/webhooks/webhook-events-and-payloads#repository_ruleset)***

* ***[repository_vulnerability_alert](https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#repository_vulnerability_alert)***

* ***[star](https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#star)***
Expand Down Expand Up @@ -276,6 +278,7 @@ Alternatively, you can choose to build and manage a webhook through the Webhooks

| google/go-github | cbrgm/githubevents |
|------------------|--------------------|
| `v67.x` | `v1.20.x` |
| `v66.x` | `v1.19.x` |
| `v65.x` | `v1.18.x` |
| `v64.x` | `v1.17.x` |
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-http-server-packages/plugins/responder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"github.com/cbrgm/githubevents/githubevents"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
)

func NewResponder(msg string) githubevents.IssueCommentEventHandleFunc {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-http-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"

"github.com/cbrgm/githubevents/githubevents"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
)

func main() {
Expand Down
40 changes: 19 additions & 21 deletions gen/template_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -786,27 +786,25 @@ var params = TemplateParameters{
Name: "repository_dispatch",
HasActions: false,
},
// todo(cbrgm): This event type is not available in the upstream version of go-github yet
// see: https://github.com/google/go-github/blob/master/github/event_types.go
// {
// Event: "RepositoryRulesetEvent",
// Name: "repository_ruleset",
// Actions: []Action{
// {
// Handler: "RepositoryRulesetEventCreated",
// Action: "created",
// },
// {
// Handler: "RepositoryRulesetEventDeleted",
// Action: "deleted",
// },
// {
// Handler: "RepositoryRulesetEventEdited",
// Action: "edited",
// },
// },
// HasActions: true,
// },
{
Event: "RepositoryRulesetEvent",
Name: "repository_ruleset",
Actions: []Action{
{
Handler: "RepositoryRulesetEventCreated",
Action: "created",
},
{
Handler: "RepositoryRulesetEventDeleted",
Action: "deleted",
},
{
Handler: "RepositoryRulesetEventEdited",
Action: "edited",
},
},
HasActions: true,
},
{
Event: "RepositoryEvent",
Name: "repository",
Expand Down
2 changes: 1 addition & 1 deletion gen/template_webhook_event_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package githubevents
import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"testing"
"sync"
)
Expand Down
2 changes: 1 addition & 1 deletion gen/template_webhook_event_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package githubevents
import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)
Expand Down
2 changes: 1 addition & 1 deletion gen/template_webook_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package githubevents
import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
"net/http"
"sync"
Expand Down
6 changes: 5 additions & 1 deletion githubevents/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
"net/http"
"sync"
Expand Down Expand Up @@ -69,6 +69,7 @@ type EventHandler struct {
onPushEvent map[string][]PushEventHandleFunc
onReleaseEvent map[string][]ReleaseEventHandleFunc
onRepositoryDispatchEvent map[string][]RepositoryDispatchEventHandleFunc
onRepositoryRulesetEvent map[string][]RepositoryRulesetEventHandleFunc
onRepositoryEvent map[string][]RepositoryEventHandleFunc
onRepositoryVulnerabilityAlertEvent map[string][]RepositoryVulnerabilityAlertEventHandleFunc
onStarEvent map[string][]StarEventHandleFunc
Expand Down Expand Up @@ -417,6 +418,9 @@ func (g *EventHandler) HandleEventRequest(req *http.Request) error {
case *github.RepositoryDispatchEvent:
return g.RepositoryDispatchEvent(deliveryID, eventName, event)

case *github.RepositoryRulesetEvent:
return g.RepositoryRulesetEvent(deliveryID, eventName, event)

case *github.RepositoryEvent:
return g.RepositoryEvent(deliveryID, eventName, event)

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

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_check_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_check_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_commit_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_deploy_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_discussion.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_github_app_authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_gollum.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"errors"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"sync"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion githubevents/events_installation.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package githubevents

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

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

import (
"fmt"
"github.com/google/go-github/v66/github"
"github.com/google/go-github/v67/github"
"golang.org/x/sync/errgroup"
)

Expand Down
Loading

0 comments on commit 2407e46

Please sign in to comment.