diff --git a/gitea/repo_branch_protection.go b/gitea/repo_branch_protection.go index 22bd7b9..3196d03 100644 --- a/gitea/repo_branch_protection.go +++ b/gitea/repo_branch_protection.go @@ -15,6 +15,7 @@ import ( // BranchProtection represents a branch protection for a repository type BranchProtection struct { BranchName string `json:"branch_name"` + RuleName string `json:"rule_name"` EnablePush bool `json:"enable_push"` EnablePushWhitelist bool `json:"enable_push_whitelist"` PushWhitelistUsernames []string `json:"push_whitelist_usernames"` @@ -35,6 +36,7 @@ type BranchProtection struct { DismissStaleApprovals bool `json:"dismiss_stale_approvals"` RequireSignedCommits bool `json:"require_signed_commits"` ProtectedFilePatterns string `json:"protected_file_patterns"` + UnprotectedFilePatterns string `json:"unprotected_file_patterns"` Created time.Time `json:"created_at"` Updated time.Time `json:"updated_at"` } @@ -42,6 +44,7 @@ type BranchProtection struct { // CreateBranchProtectionOption options for creating a branch protection type CreateBranchProtectionOption struct { BranchName string `json:"branch_name"` + RuleName string `json:"rule_name"` EnablePush bool `json:"enable_push"` EnablePushWhitelist bool `json:"enable_push_whitelist"` PushWhitelistUsernames []string `json:"push_whitelist_usernames"` @@ -62,6 +65,7 @@ type CreateBranchProtectionOption struct { DismissStaleApprovals bool `json:"dismiss_stale_approvals"` RequireSignedCommits bool `json:"require_signed_commits"` ProtectedFilePatterns string `json:"protected_file_patterns"` + UnprotectedFilePatterns string `json:"unprotected_file_patterns"` } // EditBranchProtectionOption options for editing a branch protection @@ -86,6 +90,7 @@ type EditBranchProtectionOption struct { DismissStaleApprovals *bool `json:"dismiss_stale_approvals"` RequireSignedCommits *bool `json:"require_signed_commits"` ProtectedFilePatterns *string `json:"protected_file_patterns"` + UnprotectedFilePatterns *string `json:"unprotected_file_patterns"` } // ListBranchProtectionsOptions list branch protection options