Skip to content

feat!: Fix source property on Repo Custom Properties #3333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add fix for source in repo prop
  • Loading branch information
claystation committed Oct 24, 2024
commit 06d5a7249c6394eb407e313cd48028b24a9d0674
8 changes: 8 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 5 additions & 8 deletions github/orgs_rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ func TestOrganizationsService_CreateOrganizationRuleset_RepoProperty(t *testing.
"exclude": [
{
"name": "testExcludeProp",
"source": "custom",
"property_values": [
"false"
]
Expand Down Expand Up @@ -548,14 +547,13 @@ func TestOrganizationsService_CreateOrganizationRuleset_RepoProperty(t *testing.
Include: []RulesetRepositoryPropertyTargetParameters{
{
Name: "testIncludeProp",
Source: "custom",
Source: String("custom"),
Values: []string{"true"},
},
},
Exclude: []RulesetRepositoryPropertyTargetParameters{
{
Name: "testExcludeProp",
Source: "custom",
Values: []string{"false"},
},
},
Expand Down Expand Up @@ -641,14 +639,13 @@ func TestOrganizationsService_CreateOrganizationRuleset_RepoProperty(t *testing.
Include: []RulesetRepositoryPropertyTargetParameters{
{
Name: "testIncludeProp",
Source: "custom",
Source: String("custom"),
Values: []string{"true"},
},
},
Exclude: []RulesetRepositoryPropertyTargetParameters{
{
Name: "testExcludeProp",
Source: "custom",
Values: []string{"false"},
},
},
Expand Down Expand Up @@ -1197,7 +1194,7 @@ func TestOrganizationsService_GetOrganizationRulesetWithRepoPropCondition(t *tes
Include: []RulesetRepositoryPropertyTargetParameters{
{
Name: "testIncludeProp",
Source: "custom",
Source: String("custom"),
Values: []string{"true"},
},
},
Expand Down Expand Up @@ -1390,7 +1387,7 @@ func TestOrganizationsService_UpdateOrganizationRulesetWithRepoProp(t *testing.T
Include: []RulesetRepositoryPropertyTargetParameters{
{
Name: "testIncludeProp",
Source: "custom",
Source: String("custom"),
Values: []string{"true"},
},
},
Expand Down Expand Up @@ -1422,7 +1419,7 @@ func TestOrganizationsService_UpdateOrganizationRulesetWithRepoProp(t *testing.T
Include: []RulesetRepositoryPropertyTargetParameters{
{
Name: "testIncludeProp",
Source: "custom",
Source: String("custom"),
Values: []string{"true"},
},
},
Expand Down
2 changes: 1 addition & 1 deletion github/repos_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type RulesetRepositoryIDsConditionParameters struct {
type RulesetRepositoryPropertyTargetParameters struct {
Name string `json:"name"`
Values []string `json:"property_values"`
Source string `json:"source"`
Source *string `json:"source,omitempty"`
}

// RulesetRepositoryPropertyConditionParameters represents the conditions object for repository_property.
Expand Down
Loading