Repository: google/go-github
File: github/repos.go (Go)

Code before:
type Branch struct {
	Name      *string           `json:"name,omitempty"`
	Commit    *RepositoryCommit `json:"commit,omitempty"`
	Protected *bool             `json:"protected,omitempty"`
}

type RequiredSignatures struct {
	Url     string `json:"url"`
	Enabled bool   `json:"enabled"`
}

// Protection represents a repository branch's protection.
type Protection struct {
	RequiredStatusChecks           *RequiredStatusChecks           `json:"required_status_checks"`
	RequiredPullRequestReviews     *PullRequestReviewsEnforcement  `json:"required_pull_request_reviews"`
	EnforceAdmins                  *AdminEnforcement               `json:"enforce_admins"`
	Restrictions                   *BranchRestrictions             `json:"restrictions"`
	RequireLinearHistory           *RequireLinearHistory           `json:"required_linear_history"`
	AllowForcePushes               *AllowForcePushes               `json:"allow_force_pushes"`
	AllowDeletions                 *AllowDeletions                 `json:"allow_deletions"`
	RequiredConversationResolution *RequiredConversationResolution `json:"required_conversation_resolution"`
	BlockCreations                 *BlockCreations                 `json:"block_creations,omitempty"`
	LockBranch                     *LockBranch                     `json:"lock_branch,omitempty"`
	AllowForkSyncing               *AllowForkSyncing               `json:"allow_fork_syncing,omitempty"`
	RequiredSignatures             *RequiredSignatures             `json:"required_signatures,omitempty"`
	Url                            *string                         `json:"url,omitempty"`
}

// BlockCreations represents whether users can push changes that create branches. If this is true, this
// setting blocks pushes that create new branches, unless the push is initiated by a user, team, or app
// which has the ability to push.
type BlockCreations struct {
	Enabled *bool `json:"enabled,omitempty"`
}

// LockBranch represents if the branch is marked as read-only. If this is true, users will not be able to push to the branch.
type LockBranch struct {
	Enabled *bool `json:"enabled,omitempty"`
}

// AllowForkSyncing represents whether users can pull changes from upstream when the branch is locked.
type AllowForkSyncing struct {
	Enabled *bool `json:"enabled,omitempty"`
}

// BranchProtectionRule represents the rule applied to a repositories branch.
type BranchProtectionRule struct {
	ID                                       *int64     `json:"id,omitempty"`
	RepositoryID                             *int64     `json:"repository_id,omitempty"`
	Name                                     *string    `json:"name,omitempty"`
	CreatedAt                                *Timestamp `json:"created_at,omitempty"`

Review comment (suggestion):
```suggestion
	URL                            *string                         `json:"url,omitempty"`
```

Code after:
type Branch struct {
	Name      *string           `json:"name,omitempty"`
	Commit    *RepositoryCommit `json:"commit,omitempty"`
	Protected *bool             `json:"protected,omitempty"`
}

// Protection represents a repository branch's protection.
type Protection struct {
	RequiredStatusChecks           *RequiredStatusChecks           `json:"required_status_checks"`
	RequiredPullRequestReviews     *PullRequestReviewsEnforcement  `json:"required_pull_request_reviews"`
	EnforceAdmins                  *AdminEnforcement               `json:"enforce_admins"`
	Restrictions                   *BranchRestrictions             `json:"restrictions"`
	RequireLinearHistory           *RequireLinearHistory           `json:"required_linear_history"`
	AllowForcePushes               *AllowForcePushes               `json:"allow_force_pushes"`
	AllowDeletions                 *AllowDeletions                 `json:"allow_deletions"`
	RequiredConversationResolution *RequiredConversationResolution `json:"required_conversation_resolution"`
	BlockCreations                 *BlockCreations                 `json:"block_creations,omitempty"`
	LockBranch                     *LockBranch                     `json:"lock_branch,omitempty"`
	AllowForkSyncing               *AllowForkSyncing               `json:"allow_fork_syncing,omitempty"`
	RequiredSignatures             *SignaturesProtectedBranch      `json:"required_signatures,omitempty"`
	URL                            *string                         `json:"url,omitempty"`
}

// BlockCreations represents whether users can push changes that create branches. If this is true, this
// setting blocks pushes that create new branches, unless the push is initiated by a user, team, or app
// which has the ability to push.
type BlockCreations struct {
	Enabled *bool `json:"enabled,omitempty"`
}

// LockBranch represents if the branch is marked as read-only. If this is true, users will not be able to push to the branch.
type LockBranch struct {
	Enabled *bool `json:"enabled,omitempty"`
}

// AllowForkSyncing represents whether users can pull changes from upstream when the branch is locked.
type AllowForkSyncing struct {
	Enabled *bool `json:"enabled,omitempty"`
}

// BranchProtectionRule represents the rule applied to a repositories branch.
type BranchProtectionRule struct {
	ID                                       *int64     `json:"id,omitempty"`
	RepositoryID                             *int64     `json:"repository_id,omitempty"`
	Name                                     *string    `json:"name,omitempty"`
	CreatedAt                                *Timestamp `json:"created_at,omitempty"`
	UpdatedAt                                *Timestamp `json:"updated_at,omitempty"`
	PullRequestReviewsEnforcementLevel       *string    `json:"pull_request_reviews_enforcement_level,omitempty"`
	RequiredApprovingReviewCount             *int       `json:"required_approving_review_count,omitempty"`
	DismissStaleReviewsOnPush                *bool      `json:"dismiss_stale_reviews_on_push,omitempty"`
	AuthorizedDismissalActorsOnly            *bool      `json:"authorized_dismissal_actors_only,omitempty"`