Skip to content

Conversation

@patrick-knight
Copy link

Add support for GitHub repository rules, rulesets, and rule suites

  • 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.

Closes: #820

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.
@patrick-knight patrick-knight marked this pull request as ready for review August 5, 2025 22:14
@patrick-knight patrick-knight requested a review from a team as a code owner August 5, 2025 22:14
Copilot AI review requested due to automatic review settings August 5, 2025 22:14

This comment was marked as outdated.

@patrick-knight patrick-knight requested a review from Copilot August 5, 2025 22:30
Copy link
Contributor

Copilot AI left a 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add support for rulesets and custom properties.

1 participant