-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add support for rulesets and custom properties. #821
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
base: main
Are you sure you want to change the base?
Conversation
Add comprehensive tests for GitHub repository ruleset functionalities - Implement tests for GetRepositoryRuleset, ListRepositoryRulesets, GetRepositoryRulesForBranch, GetOrganizationRepositoryRuleset, ListOrganizationRepositoryRulesets, ListRepositoryRuleSuites, and GetRepositoryRuleSuite functions. - Validate tool definitions, input schemas, and required parameters. - Mock GitHub API responses for various scenarios including successful fetches and error cases. - Ensure proper error handling and assertions for expected outcomes in tests.
Delete pkg/github/discussions_test.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive support for GitHub repository rules, rulesets, and rule suites across repository, organization, and enterprise levels. Additionally, it introduces custom properties functionality for repositories, organizations, and enterprises.
- Implements 15 new API tools covering rulesets, rule suites, and custom properties
- Adds extensive test coverage for all new ruleset and rule suite operations
- Creates a new enterprise toolset for enterprise-level operations
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
pkg/github/tools.go | Adds new tool registrations for rulesets, rule suites, and custom properties across repository, organization, and enterprise scopes |
pkg/github/rules.go | Implements complete ruleset and rule suite functionality with both read and write operations |
pkg/github/rules_test.go | Comprehensive test suite validating tool definitions, parameter validation, and API interactions |
pkg/github/custom_properties.go | Implements custom properties management for repositories, organizations, and enterprises |
pkg/github/toolsnaps/*.snap | Tool definition snapshots for automated validation |
docs/remote-server.md | Documents new enterprise toolset availability |
README.md | Updates documentation with all new tools and their parameters |
pkg/github/discussions_test.go | File deletion (moved/consolidated elsewhere) |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Add support for GitHub repository rules, rulesets, and rule suites
Closes: #820