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

Code before:
	RequiredStatusChecks       *RequiredStatusChecks                 `json:"required_status_checks"`
	RequiredPullRequestReviews *PullRequestReviewsEnforcementRequest `json:"required_pull_request_reviews"`
	EnforceAdmins              bool                                  `json:"enforce_admins"`
	Restrictions               *BranchRestrictionsRequest            `json:"restrictions"`
	// Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch.
	RequireLinearHistory *bool `json:"required_linear_history,omitempty"`
	// Permits force pushes to the protected branch by anyone with write access to the repository.
	AllowForcePushes *bool `json:"allow_force_pushes,omitempty"`
	// Allows deletion of the protected branch by anyone with write access to the repository.
	AllowDeletions *bool `json:"allow_deletions,omitempty"`
	// RequiredConversationResolution, if set to true, requires all comments
	// on the pull request to be resolved before it can be merged to a protected branch.
	RequiredConversationResolution *bool `json:"required_conversation_resolution,omitempty"`
	// BlockCreations, if set to true, will cause the restrictions setting to also block pushes
	// which create new branches, unless initiated by a user, team, app with the ability to push.
	BlockCreations *bool `json:"block_creations,omitempty"`
	// LockBranch, if set to true, will prevent users from pushing to the branch.
	LockBranch *bool `json:"lock_branch,omitempty"`
	// AllowForkSyncing, if set to true, will allow users to pull changes from upstream
	// when the branch is locked.
	AllowForkSyncing *bool `json:"allow_fork_syncing,omitempty"`
}

// RequiredStatusChecks represents the protection status of a individual branch.
type RequiredStatusChecks struct {
	Url         *string `json:"url,omitempty"`
	ContextsUrl *string `json:"contexts_url,omitempty"`
	// Require branches to be up to date before merging. (Required.)
	Strict bool `json:"strict"`
	// The list of status checks to require in order to merge into this
	// branch. (Deprecated. Note: only one of Contexts/Checks can be populated,
	// but at least one must be populated).
	Contexts []string `json:"contexts,omitempty"`
	// The list of status checks to require in order to merge into this
	// branch.
	Checks []*RequiredStatusCheck `json:"checks"`
}

// RequiredStatusChecksRequest represents a request to edit a protected branch's status checks.
type RequiredStatusChecksRequest struct {
	Strict *bool `json:"strict,omitempty"`
	// Note: if both Contexts and Checks are populated,
	// the GitHub API will only use Checks.
	Contexts []string               `json:"contexts,omitempty"`
	Checks   []*RequiredStatusCheck `json:"checks,omitempty"`
}

// RequiredStatusCheck represents a status check of a protected branch.
type RequiredStatusCheck struct {
	// The name of the required check.
	Context string `json:"context"`

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

Code after:
	RequireLinearHistory *bool `json:"required_linear_history,omitempty"`
	// Permits force pushes to the protected branch by anyone with write access to the repository.
	AllowForcePushes *bool `json:"allow_force_pushes,omitempty"`
	// Allows deletion of the protected branch by anyone with write access to the repository.
	AllowDeletions *bool `json:"allow_deletions,omitempty"`
	// RequiredConversationResolution, if set to true, requires all comments
	// on the pull request to be resolved before it can be merged to a protected branch.
	RequiredConversationResolution *bool `json:"required_conversation_resolution,omitempty"`
	// BlockCreations, if set to true, will cause the restrictions setting to also block pushes
	// which create new branches, unless initiated by a user, team, app with the ability to push.
	BlockCreations *bool `json:"block_creations,omitempty"`
	// LockBranch, if set to true, will prevent users from pushing to the branch.
	LockBranch *bool `json:"lock_branch,omitempty"`
	// AllowForkSyncing, if set to true, will allow users to pull changes from upstream
	// when the branch is locked.
	AllowForkSyncing *bool `json:"allow_fork_syncing,omitempty"`
}

// RequiredStatusChecks represents the protection status of a individual branch.
type RequiredStatusChecks struct {
	// Require branches to be up to date before merging. (Required.)
	Strict bool `json:"strict"`
	// The list of status checks to require in order to merge into this
	// branch. (Deprecated. Note: only one of Contexts/Checks can be populated,
	// but at least one must be populated).
	Contexts []string `json:"contexts,omitempty"`
	// The list of status checks to require in order to merge into this
	// branch.
	Checks      []*RequiredStatusCheck `json:"checks"`
	ContextsURL *string                `json:"contexts_url,omitempty"`
	URL         *string                `json:"url,omitempty"`
}

// RequiredStatusChecksRequest represents a request to edit a protected branch's status checks.
type RequiredStatusChecksRequest struct {
	Strict *bool `json:"strict,omitempty"`
	// Note: if both Contexts and Checks are populated,
	// the GitHub API will only use Checks.
	Contexts []string               `json:"contexts,omitempty"`
	Checks   []*RequiredStatusCheck `json:"checks,omitempty"`
}

// RequiredStatusCheck represents a status check of a protected branch.
type RequiredStatusCheck struct {
	// The name of the required check.
	Context string `json:"context"`
	// The ID of the GitHub App that must provide this check.
	// Omit this field to automatically select the GitHub App
	// that has recently provided this check,
	// or any app if it was not set by a GitHub App.
	// Pass -1 to explicitly allow any app to set the status.