From 707124e1c24865a81c5cb58b79b467e47870d3e4 Mon Sep 17 00:00:00 2001 From: Robert Spier Date: Thu, 18 Apr 2019 10:42:28 -0700 Subject: [PATCH] Add disabled bit to Organization struct. --- github/github-accessors.go | 8 ++++++++ github/repos.go | 1 + 2 files changed, 9 insertions(+) diff --git a/github/github-accessors.go b/github/github-accessors.go index 5034beb18a9..1366ebbc975 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -9132,6 +9132,14 @@ func (r *Repository) GetDescription() string { return *r.Description } +// GetDisabled returns the Disabled field if it's non-nil, zero value otherwise. +func (r *Repository) GetDisabled() bool { + if r == nil || r.Disabled == nil { + return false + } + return *r.Disabled +} + // GetDownloadsURL returns the DownloadsURL field if it's non-nil, zero value otherwise. func (r *Repository) GetDownloadsURL() string { if r == nil || r.DownloadsURL == nil { diff --git a/github/repos.go b/github/repos.go index 617c20db545..0416b0ec623 100644 --- a/github/repos.go +++ b/github/repos.go @@ -57,6 +57,7 @@ type Repository struct { AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` Topics []string `json:"topics,omitempty"` Archived *bool `json:"archived,omitempty"` + Disabled *bool `json:"disabled,omitempty"` // Only provided when using RepositoriesService.Get while in preview License *License `json:"license,omitempty"`