Skip to content

Can't unmarshal Branch Protection Response lock_branch #2612

@liaodaniel

Description

@liaodaniel

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions