nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: cloudflare/cloudflare-go
Pull request #2621 (2024-06-19 13:52:19)

feat: added new rule level settings ignore_cname_category_matches to…
This PR addsa new settings to a ZT rule of type boolean. 
Api is published here https://developers.cloudflare.com/api/operations/zero-trust-gateway-rules-create-zero-trust-gateway-rule

github-actions[bot]: changelog detected :white_check_mark:

Patch:
diff --git a/.changelog/2621.txt b/.changelog/2621.txt
new file mode 100644
index 000000000..315bfff3f
--- /dev/null
+++ b/.changelog/2621.txt
@@ -0,0 +1,7 @@
+```release-note:enhancement
+teams_rules: Added ZT rule settings `ignore_cname_category_matches`
+````
+
+```release-note:enhancement
+teams_list: Added description to ZT list item
+```
diff --git a/teams_list.go b/teams_list.go
index 066d7afff..61f160c87 100644
--- a/teams_list.go
+++ b/teams_list.go
@@ -26,8 +26,9 @@ type TeamsList struct {
 
 // TeamsListItem represents a single list item.
 type TeamsListItem struct {
-	Value     string     `json:"value"`
-	CreatedAt *time.Time `json:"created_at,omitempty"`
+	Value       string     `json:"value"`
+	Description string     `json:"description,omitempty"`
+	CreatedAt   *time.Time `json:"created_at,omitempty"`
 }
 
 // PatchTeamsList represents a patch request for appending/removing list items.
diff --git a/teams_rules.go b/teams_rules.go
index b03c01215..38bfbcec0 100644
--- a/teams_rules.go
+++ b/teams_rules.go
@@ -49,6 +49,9 @@ type TeamsRuleSettings struct {
 	// Turns on ip category based filter on dns if the rule contains dns category checks
 	IPCategories bool `json:"ip_categories"`
 
+	// Turns on for explicitly ignoring cname domain category matches
+	IgnoreCNAMECategoryMatches *bool `json:"ignore_cname_category_matches"`
+
 	// Allow parent MSP accounts to enable bypass their children's rules. Do not set them for non MSP accounts.
 	AllowChildBypass *bool `json:"allow_child_bypass,omitempty"`
 


Test patch:
diff --git a/teams_rules_test.go b/teams_rules_test.go
index 226ce50bb..4b9f4a34d 100644
--- a/teams_rules_test.go
+++ b/teams_rules_test.go
@@ -54,6 +54,7 @@ func TestTeamsRules(t *testing.T) {
 					"untrusted_cert": {
 						"action": "error"
 					},
+					"ignore_cname_category_matches": true,
 					"dns_resolvers": {
 						"ipv4": [
 							{"ip": "10.0.0.2", "port": 5053},
@@ -142,6 +143,7 @@ func TestTeamsRules(t *testing.T) {
 			UntrustedCertSettings: &UntrustedCertSettings{
 				Action: UntrustedCertError,
 			},
+			IgnoreCNAMECategoryMatches: BoolPtr(true),
 			DnsResolverSettings: &TeamsDnsResolverSettings{
 				V4Resolvers: []TeamsDnsResolverAddressV4{
 					{
Repository: cloudflare/cloudflare-go
Pull request #2713 (2024-07-01 21:49:54)

GIN-341: add certificate setting to teams gateway account gateway configuration
## Description

This new `certificate` setting specifies the certificate used for Gateway TLS interception. It replaces and deprecates the custom certificate setting. 

https://developers.cloudflare.com/api/operations/zero-trust-accounts-get-zero-trust-account-configuration

## Has your change been tested?

Added to unit tests in teams_accounts_test.go

## Types of changes

What sort of change does your code introduce/modify?

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:

- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
- [x] This change is using publicly documented in [cloudflare/api-schemas](https://github.com/cloudflare/api-schemas) 
      and relies on stable APIs.

[1]: https://help.github.com/articles/closing-issues-using-keywords/


github-actions[bot]: changelog detected :white_check_mark:

Patch:
diff --git a/.changelog/2713.txt b/.changelog/2713.txt
new file mode 100644
index 000000000..5d8e2be06
--- /dev/null
+++ b/.changelog/2713.txt
@@ -0,0 +1,3 @@
+```release-note:enhancement
+teams: added per account certificate setting to teams gateway configuration
+```
diff --git a/teams_accounts.go b/teams_accounts.go
index 3472fa487..f426c68ba 100644
--- a/teams_accounts.go
+++ b/teams_accounts.go
@@ -47,6 +47,7 @@ type TeamsAccountSettings struct {
 	BodyScanning          *TeamsBodyScanning          `json:"body_scanning,omitempty"`
 	ExtendedEmailMatching *TeamsExtendedEmailMatching `json:"extended_email_matching,omitempty"`
 	CustomCertificate     *TeamsCustomCertificate     `json:"custom_certificate,omitempty"`
+	Certificate           *TeamsCertificate           `json:"certificate,omitempty"`
 }
 
 type BrowserIsolation struct {
@@ -112,6 +113,10 @@ type TeamsCustomCertificate struct {
 	UpdatedAt     *time.Time `json:"updated_at,omitempty"`
 }
 
+type TeamsCertificate struct {
+	ID string `json:"id"`
+}
+
 type TeamsRuleType = string
 
 const (


Test patch:
diff --git a/teams_accounts_test.go b/teams_accounts_test.go
index 5fd3686ac..52873da6c 100644
--- a/teams_accounts_test.go
+++ b/teams_accounts_test.go
@@ -93,6 +93,9 @@ func TestTeamsAccountConfiguration(t *testing.T) {
 					},
 					"extended_email_matching": {
 						"enabled": true
+					},
+					"certificate": {
+						"id": "7559a944-3dd7-41bf-b183-360a814a8c36"
 					}
 				}
 			}
@@ -138,6 +141,9 @@ func TestTeamsAccountConfiguration(t *testing.T) {
 			ExtendedEmailMatching: &TeamsExtendedEmailMatching{
 				Enabled: BoolPtr(true),
 			},
+			Certificate: &TeamsCertificate{
+				ID: "7559a944-3dd7-41bf-b183-360a814a8c36",
+			},
 		})
 	}
 }