Skip to content

Commit

Permalink
Bump go-github to v46.0.0 (integrations#1258)
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>

Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
  • Loading branch information
gesellix committed Aug 30, 2022
1 parent afb93fa commit 1698c52
Show file tree
Hide file tree
Showing 198 changed files with 526 additions and 192 deletions.
2 changes: 1 addition & 1 deletion github/config.go
Expand Up @@ -8,7 +8,7 @@ import (
"path"
"time"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/logging"
"github.com/shurcooL/githubv4"
"golang.org/x/oauth2"
Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_branch.go
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"net/http"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_collaborators.go
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/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_external_groups.go
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/json"
"fmt"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

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

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/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
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

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

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_release.go
Expand Up @@ -8,7 +8,7 @@ import (

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

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

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

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/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
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strings"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_repository_file.go
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"log"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/data_source_github_repository_pull_requests.go
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"strings"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/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_team.go
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"strconv"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"

"github.com/shurcooL/githubv4"

Expand Down
2 changes: 1 addition & 1 deletion github/repository_utils.go
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"strings"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
)

// checkRepositoryBranchExists tests if a branch exists in a repository.
Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_actions_environment_secret.go
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"net/http"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/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_organization_permissions.go
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"errors"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/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_organization_secret.go
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"net/http"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
)
Expand Down
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_actions_runner_group.go
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strconv"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/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_secret.go
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"net/http"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"golang.org/x/crypto/nacl/box"
)
Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_app_installation_repository.go
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strconv"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_branch.go
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strings"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_branch_default.go
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_branch_protection_v3.go
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"net/http"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/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_branch_protection_v3_utils.go
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"strings"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
10 changes: 5 additions & 5 deletions github/resource_github_dependabot_organization_secret.go
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"net/http"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
)
Expand Down Expand Up @@ -89,13 +89,13 @@ func resourceGithubDependabotOrganizationSecretCreateOrUpdate(d *schema.Resource
return fmt.Errorf("Cannot use selected_repository_ids without visibility being set to selected")
}

selectedRepositoryIDs := []int64{}
selectedRepositoryIDs := []string{}

if hasSelectedRepositories {
ids := selectedRepositories.(*schema.Set).List()

for _, id := range ids {
selectedRepositoryIDs = append(selectedRepositoryIDs, int64(id.(int)))
selectedRepositoryIDs = append(selectedRepositoryIDs, id.(string))
}
}

Expand All @@ -114,8 +114,8 @@ func resourceGithubDependabotOrganizationSecretCreateOrUpdate(d *schema.Resource
encryptedValue = base64.StdEncoding.EncodeToString(encryptedBytes)
}

// Create an EncryptedSecret and encrypt the plaintext value into it
eSecret := &github.EncryptedSecret{
// Create an DependabotEncryptedSecret and encrypt the plaintext value into it
eSecret := &github.DependabotEncryptedSecret{
Name: secretName,
KeyID: keyId,
Visibility: visibility,
Expand Down
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down Expand Up @@ -49,11 +49,11 @@ func resourceGithubDependabotOrganizationSecretRepositoriesCreateOrUpdate(d *sch
secretName := d.Get("secret_name").(string)
selectedRepositories := d.Get("selected_repository_ids")

selectedRepositoryIDs := []int64{}
selectedRepositoryIDs := []string{}

ids := selectedRepositories.(*schema.Set).List()
for _, id := range ids {
selectedRepositoryIDs = append(selectedRepositoryIDs, int64(id.(int)))
selectedRepositoryIDs = append(selectedRepositoryIDs, id.(string))
}

_, err = client.Dependabot.SetSelectedReposForOrgSecret(ctx, owner, secretName, selectedRepositoryIDs)
Expand Down Expand Up @@ -110,7 +110,7 @@ func resourceGithubDependabotOrganizationSecretRepositoriesDelete(d *schema.Reso
return err
}

selectedRepositoryIDs := []int64{}
selectedRepositoryIDs := []string{}
_, err = client.Dependabot.SetSelectedReposForOrgSecret(ctx, owner, d.Id(), selectedRepositoryIDs)
if err != nil {
return err
Expand Down
6 changes: 3 additions & 3 deletions github/resource_github_dependabot_secret.go
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"net/http"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"golang.org/x/crypto/nacl/box"
)
Expand Down Expand Up @@ -81,8 +81,8 @@ func resourceGithubDependabotSecretCreateOrUpdate(d *schema.ResourceData, meta i
encryptedValue = base64.StdEncoding.EncodeToString(encryptedBytes)
}

// Create an EncryptedSecret and encrypt the plaintext value into it
eSecret := &github.EncryptedSecret{
// Create an DependabotEncryptedSecret and encrypt the plaintext value into it
eSecret := &github.DependabotEncryptedSecret{
Name: secretName,
KeyID: keyId,
EncryptedValue: encryptedValue,
Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_emu_group_mapping.go
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strconv"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_issue.go
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"strconv"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_issue_label.go
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"net/http"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_membership.go
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"net/http"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_membership_test.go
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"testing"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/terraform"
)
Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_organization_project.go
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strconv"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_organization_project_test.go
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"testing"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/terraform"
)
Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_organization_webhook.go
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"strconv"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion github/resource_github_project_card.go
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"strings"

"github.com/google/go-github/v45/github"
"github.com/google/go-github/v46/github"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down

0 comments on commit 1698c52

Please sign in to comment.