| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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
There was a problem hiding this comment.
Adds a non-default governance toolset for repository, organization, and enterprise rulesets.
Changes:
| File | Description |
|---|---|
| README.md | Documents the governance toolset and tools. |
| docs/remote-server.md | Documents the remote governance endpoint. |
| pkg/scopes/scopes.go | Adds enterprise OAuth scopes. |
| pkg/octicons/required_icons.txt | Adds the law icon requirement. |
| pkg/github/tools.go | Registers governance metadata and tools. |
| pkg/github/rulesets.go | Implements ruleset tools and API operations. |
| pkg/github/rulesets_test.go | Tests ruleset schemas and handlers. |
| pkg/github/__toolsnaps__/repository_ruleset_read.snap | Snapshots repository read schema. |
| pkg/github/__toolsnaps__/organization_repository_ruleset_read.snap | Snapshots organization read schema. |
| pkg/github/__toolsnaps__/create_repository_ruleset.snap | Snapshots repository creation schema. |
| pkg/github/__toolsnaps__/create_organization_repository_ruleset.snap | Snapshots organization creation schema. |
| pkg/github/__toolsnaps__/create_enterprise_repository_ruleset.snap | Snapshots enterprise creation schema. |
Sorry, something went wrong.
| for _, ruleType := range requestedRuleTypes { | ||
| if !appliedRuleTypes[ruleType] { | ||
| return github.RepositoryRuleset{}, utils.NewToolResultError(fmt.Sprintf("unsupported or unrecognized rule type: %q", ruleType)) |
| "bypass_mode": { | ||
| Type: "string", | ||
| Enum: []any{"always", "pull_request"}, | ||
| Description: "When the specified actor can bypass the ruleset", |
| "actor_type": { | ||
| Type: "string", | ||
| Enum: []any{"Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey"}, | ||
| Description: "The type of actor that can bypass a ruleset", |
| User: {ReadUser, UserEmail}, | ||
| Repo: {PublicRepo, SecurityEvents}, | ||
| AdminOrg: {WriteOrg, ReadOrg}, | ||
| AdminEnterprise: {ReadEnterprise}, |
| Back | FazBrowse Home | New Git URL |
Governance toolset — Rulesets (PR 1 of 2)
Adds a new non-default governance toolset (icon: law) and the first half of its tools: GitHub repository rulesets at the repository, organization, and enterprise levels.
This supersedes the very stale #821 (re: #820), replayed onto the current codebase (modelcontextprotocol/go-sdk, go-github v87) and reshaped to match today's MCP tool surface.
Tools (5)
Design notes
Stack
Verified: script/lint (0 issues), script/test, script/generate-docs all green.