Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump go-github to v57 #2081

Merged
merged 3 commits into from
Jan 5, 2024
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion github/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"time"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/logging"
"github.com/shurcooL/githubv4"
"golang.org/x/oauth2"
Expand Down
4 changes: 2 additions & 2 deletions github/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestAccConfigMeta(t *testing.T) {

ctx := context.Background()
client := meta.(*Owner).v3client
_, _, err = client.APIMeta(ctx)
_, _, err = client.Meta.Get(ctx)
if err != nil {
t.Fatalf("failed to validate returned client without error: %s", err.Error())
}
Expand All @@ -51,7 +51,7 @@ func TestAccConfigMeta(t *testing.T) {

ctx := context.Background()
client := meta.(*Owner).v3client
_, _, err = client.APIMeta(ctx)
_, _, err = client.Meta.Get(ctx)
if err != nil {
t.Fatalf("failed to validate returned client without error: %s", err.Error())
}
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_actions_environment_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"net/url"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_actions_environment_variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"net/url"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_actions_organization_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_actions_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_actions_variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_app_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"testing"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"net/http"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_codespaces_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_codespaces_user_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_collaborators.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_dependabot_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_external_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/json"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_ip_ranges.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func dataSourceGithubIpRanges() *schema.Resource {
func dataSourceGithubIpRangesRead(d *schema.ResourceData, meta interface{}) error {
owner := meta.(*Owner)

api, _, err := owner.v3client.APIMeta(owner.StopContext)
api, _, err := owner.v3client.Meta.Get(owner.StopContext)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_issue_labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

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

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/shurcooL/githubv4"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_organization_custom_role.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/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_organization_team_sync_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

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

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"net/http"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

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

"github.com/hashicorp/terraform-plugin-sdk/helper/validation"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

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

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strings"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_repository_branches.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_repository_deploy_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

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

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_repository_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"
"strings"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_repository_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"
"testing"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/stretchr/testify/assert"

"github.com/hashicorp/terraform-plugin-sdk/helper/acctest"
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_repository_pull_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"strings"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_repository_teams.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_repository_webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_ssh_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func dataSourceGithubSshKeys() *schema.Resource {
func dataSourceGithubSshKeysRead(d *schema.ResourceData, meta interface{}) error {
owner := meta.(*Owner)

api, _, err := owner.v3client.APIMeta(owner.StopContext)
api, _, err := owner.v3client.Meta.Get(owner.StopContext)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_team.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"strconv"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/shurcooL/githubv4"

Expand Down
4 changes: 2 additions & 2 deletions github/repository_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"net/http"
"strings"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
)

// checkRepositoryBranchExists tests if a branch exists in a repository.
func checkRepositoryBranchExists(client *github.Client, owner, repo, branch string) error {
ctx := context.WithValue(context.Background(), ctxId, buildTwoPartID(repo, branch))
_, _, err := client.Repositories.GetBranch(ctx, owner, repo, branch, true)
_, _, err := client.Repositories.GetBranch(ctx, owner, repo, branch, 2)
if err != nil {
if ghErr, ok := err.(*github.ErrorResponse); ok {
if ghErr.Response.StatusCode == http.StatusNotFound {
Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_actions_environment_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"net/url"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
)
Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_actions_environment_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"net/url"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
Loading