From 7a55b9b2d11114595a5058c3d80a01e879a15b8d Mon Sep 17 00:00:00 2001 From: Michelangelo Date: Tue, 19 May 2020 16:07:13 +0200 Subject: [PATCH] fields can be empty --- github/repos.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github/repos.go b/github/repos.go index 1014d91f44b..b8c8166b509 100644 --- a/github/repos.go +++ b/github/repos.go @@ -864,9 +864,9 @@ type BranchRestrictions struct { // different from the response structure. type BranchRestrictionsRequest struct { // The list of user logins with push access. (Required; use []string{} instead of nil for empty list.) - Users []string `json:"users"` + Users []string `json:"users,omitempty"` // The list of team slugs with push access. (Required; use []string{} instead of nil for empty list.) - Teams []string `json:"teams"` + Teams []string `json:"teams,omitempty"` // The list of app slugs with push access. Apps []string `json:"apps,omitempty"` }