Skip to content

Commit c96ef95

Browse files
authored
Add Source field to RulesetRepositoryPropertyTargetParameters (#3250)
Fixes: #3247.
1 parent 039fefd commit c96ef95

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

github/orgs_rules_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,12 +555,14 @@ func TestOrganizationsService_CreateOrganizationRuleset_RepoProperty(t *testing.
555555
Include: []RulesetRepositoryPropertyTargetParameters{
556556
{
557557
Name: "testIncludeProp",
558+
Source: "custom",
558559
Values: []string{"true"},
559560
},
560561
},
561562
Exclude: []RulesetRepositoryPropertyTargetParameters{
562563
{
563564
Name: "testExcludeProp",
565+
Source: "custom",
564566
Values: []string{"false"},
565567
},
566568
},
@@ -647,12 +649,14 @@ func TestOrganizationsService_CreateOrganizationRuleset_RepoProperty(t *testing.
647649
Include: []RulesetRepositoryPropertyTargetParameters{
648650
{
649651
Name: "testIncludeProp",
652+
Source: "custom",
650653
Values: []string{"true"},
651654
},
652655
},
653656
Exclude: []RulesetRepositoryPropertyTargetParameters{
654657
{
655658
Name: "testExcludeProp",
659+
Source: "custom",
656660
Values: []string{"false"},
657661
},
658662
},
@@ -1206,6 +1210,7 @@ func TestOrganizationsService_GetOrganizationRulesetWithRepoPropCondition(t *tes
12061210
Include: []RulesetRepositoryPropertyTargetParameters{
12071211
{
12081212
Name: "testIncludeProp",
1213+
Source: "custom",
12091214
Values: []string{"true"},
12101215
},
12111216
},
@@ -1397,6 +1402,7 @@ func TestOrganizationsService_UpdateOrganizationRulesetWithRepoProp(t *testing.T
13971402
Include: []RulesetRepositoryPropertyTargetParameters{
13981403
{
13991404
Name: "testIncludeProp",
1405+
Source: "custom",
14001406
Values: []string{"true"},
14011407
},
14021408
},
@@ -1428,6 +1434,7 @@ func TestOrganizationsService_UpdateOrganizationRulesetWithRepoProp(t *testing.T
14281434
Include: []RulesetRepositoryPropertyTargetParameters{
14291435
{
14301436
Name: "testIncludeProp",
1437+
Source: "custom",
14311438
Values: []string{"true"},
14321439
},
14331440
},

github/repos_rules.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type RulesetRepositoryIDsConditionParameters struct {
5252
type RulesetRepositoryPropertyTargetParameters struct {
5353
Name string `json:"name"`
5454
Values []string `json:"property_values"`
55+
Source string `json:"source"`
5556
}
5657

5758
// RulesetRepositoryPropertyConditionParameters represents the conditions object for repository_property.

0 commit comments

Comments
 (0)