Add support for rulesets and custom properties. - #821
Closed
patrick-knight wants to merge 9 commits into
Closed
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
Contributor
There was a problem hiding this comment.
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>
This was referenced Jul 31, 2026
SamMorrowDrums
added a commit
that referenced
this pull request
Aug 25, 2026
Add a new non-default "governance" toolset (icon: law) with tools for managing GitHub repository rulesets at the repository, organization, and enterprise levels. Read operations are consolidated behind method-dispatch tools to match the current MCP surface: - repository_ruleset_read (get, list, get_rules_for_branch, list_rule_suites, get_rule_suite) - organization_repository_ruleset_read (get, list) Write operations remain single-purpose tools, split by level because each level requires a distinct OAuth scope for scope-challenge accuracy: - create_repository_ruleset (repo) - create_organization_repository_ruleset (admin:org) - create_enterprise_repository_ruleset (admin:enterprise) Adds the read:enterprise and admin:enterprise scopes and the law octicon as shared governance infrastructure. Supersedes #821. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8
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.
Add support for GitHub repository rules, rulesets, and rule suites
Closes: #820