Open Context Protocol is live! 🚀 Read the launch post
reposGetRepoRulesetHistory

reposGetRepoRulesetHistory

Get repository ruleset history

Details

  • Method: GET
  • Path: /repos/{owner}/{repo}/rulesets/{ruleset_id}/history
  • Operation ID: repos/get-repo-ruleset-history

Parameters

{
  "owner": {
    "description": "The account owner of the repository. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "repo": {
    "description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "per_page": {
    "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "page": {
    "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "ruleset_id": {
    "description": "The ID of the ruleset.",
    "required": true,
    "location": "path",
    "type": "integer"
  }
}

Response Schema

{
  "type": "array",
  "items": {
    "title": "Ruleset version",
    "type": "object",
    "description": "The historical version of a ruleset",
    "required": [
      "version_id",
      "actor",
      "updated_at"
    ],
    "properties": {
      "version_id": {
        "type": "integer",
        "description": "The ID of the previous version of the ruleset"
      },
      "actor": {
        "type": "object",
        "description": "The actor who updated the ruleset",
        "properties": {
          "id": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('github')

# Call this tool
result = await agent.call_tool('reposGetRepoRulesetHistory', {
    # Add required parameters here
})