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

Can't unmarshal Branch Protection Response lock_branch #2612

Closed
liaodaniel opened this issue Jan 3, 2023 · 2 comments
Closed

Can't unmarshal Branch Protection Response lock_branch #2612

liaodaniel opened this issue Jan 3, 2023 · 2 comments

Comments

@liaodaniel
Copy link
Contributor

In version v48.2.0, we are getting an error trying to unmarshal the UpdateBranchProtection response:

json: cannot unmarshal object into Go struct field Protection.lock_branch of type bool: the action couldn't be fully processed, please retry command

Code snippet:

protection, res, err := c.githubClient.Repositories.UpdateBranchProtection(context.TODO(), "org", "repo", "main", request)
if err != nil {
  return err
}
@gmlewis
Copy link
Collaborator

gmlewis commented Jan 3, 2023

I believe this will be fixed by this breaking API change: #2606
in the next release.

@liaodaniel
Copy link
Contributor Author

Looks like the fix is released already.

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

No branches or pull requests

2 participants