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 v37 #893

Merged
merged 1 commit into from
Sep 2, 2021
Merged

Conversation

kfcampbell
Copy link
Member

@kfcampbell kfcampbell commented Aug 31, 2021

In order to work on #868, we must be on v38 of the google/go-github client. We're currently 2 major versions behind, so this PR will need to be followed by another one before #868 is unblocked.

API Changes include only one breaking change: Modify GetBranch to handle redirects. I've chosen to default that to true in our code here. Please let me know if that should change!

@jcudit jcudit added this to the v4.14.0 milestone Aug 31, 2021
@@ -331,7 +331,7 @@ func resourceGithubRepositoryFileDelete(d *schema.ResourceData, meta interface{}
// 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)
_, _, err := client.Repositories.GetBranch(ctx, owner, repo, branch, true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed on true as a sane default.

@jcudit jcudit merged commit 443daae into integrations:main Sep 2, 2021
@kfcampbell kfcampbell deleted the go-github-v37 branch September 8, 2021 01:06
kfcampbell added a commit to kfcampbell/terraform-provider-github that referenced this pull request Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants