Repository navigation
feat: Add support for organization rule suites - #4642
Open
JamBalaya56562 wants to merge 1 commit into
Open
JamBalaya56562 wants to merge 1 commit into
JamBalaya56562 wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4642 +/- ##
=======================================
Coverage 98.61% 98.62%
=======================================
Files 199 200 +1
Lines 18694 18730 +36
=======================================
+ Hits 18436 18472 +36
Misses 258 258 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
approved these changes
Oct 17, 2026
gmlewis
left a comment
Collaborator
There was a problem hiding this comment.
Thank you, @JamBalaya56562!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #4641.
Closes: #4482.
Supersedes #4482 by @ralucas, which has been inactive since the review in late August. This builds on that implementation and addresses the open review comments. Thanks to @ralucas for the original work.
This adds the organization rule suites endpoints:
OrganizationsService.ListRuleSuitesGET /orgs/{org}/rulesets/rule-suitesOrganizationsService.GetRuleSuiteGET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}Changes from #4482, following the review there:
ListRuleSuitesOptionscovers all of the documented query parameters (ref,repository_name,time_period,actor_name,rule_suite_result,evaluate_status) and embedsListOptionsforpageandper_page.ListRuleSuitesandGetRuleSuite, sinceOrganizationis redundant onOrganizationsService.orgs_rule_suites.go.u := fmt.Sprintf(...)/addOptions(u, opts)pattern.testFormValuesand the error paths withtestBadOptions/testNewRequestAndDoFailurein the main test functions, and usereferenceTimestamp.RuleSuite,RuleEvaluation, andRuleEvaluationSourcehave every property of therule-suitesandrule-suiteresponse schemas. The generatedListRuleSuitesIteriterator is included.The repository-level rule suites endpoints are still missing and can be added separately.
Verified locally:
go build ./...,go vet -tags integration ./test/integration/,go test ./...(100% coverage of both methods and the iterator), generated files idempotent,script/metadata.sh check, andcustom-gcl0 issues.