RepoRefiner
RepoRefiner · GPT Actions
GitHub API for RepoRefiner
An OpenAPI specification to integrate RepoRefiner with GitHub API for efficient repository analysis.
GET /search/repositoriesFetch RepositoriesGET /repos/{owner}/{repo}/contents/{path}Get contents of a path in a repositoryGET /users/{username}/reposList user repositories with paginationGET /users/{username}/followingList users followed by a specific user with paginationGET /users/{username}/starredList repositories starred by a specific userGET /repos/{owner}/{repo}/commitsList commits in a repository
原始 API 定义
{
"openapi": "3.1.0",
"info": {
"title": "GitHub API for RepoRefiner",
"description": "An OpenAPI specification to integrate RepoRefiner with GitHub API for efficient repository analysis.",
"version": "v1.0.0"
},
"servers": [
{
"url": "https://api.github.com"
}
],
"paths": {
"/search/repositories": {
"get": {
"summary": "Fetch Repositories",
"operationId": "fetchRepositories",
"tags": [
"GitHub"
],
"parameters": [
{
"name": "q",
"in": "query",
"description": "Search term",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "sort",
"in": "query",
"description": "The sort field. Can be stars, forks, or updated. Default: best match",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "order",
"in": "query",
"description": "The sort order if sort parameter is provided. Can be asc or desc",
"required": false,
"schema": {
"type": "string",
"default": "desc"
}
},
{
"name": "per_page",
"in": "query",
"description": "Number of results per page (max 100)",
"required": false,
"schema": {
"type": "integer",
"default": 30
}
},
{
"name": "page",
"in": "query",
"description": "Page number of the results to fetch",
"required": false,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "A list of repositories",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Repository"
}
}
}
}
}
}
},
"/repos/{owner}/{repo}/contents/{path}": {
"get": {
"summary": "Get contents of a path in a repository",
"operationId": "getRepoContents",
"tags": [
"Repository Contents"
],
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "path",
"in": "path",
"required": true,
"schema": {
"type": "string",
"default": ""
}
}
],
"responses": {
"200": {
"description": "The contents of the path",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"encoding": {
"type": "string"
},
"size": {
"type": "integer"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"content": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"download_url": {
"type": "string"
},
"_links": {
"type": "object"
}
}
}
}
}
}
},
"security": [
{
"BearerAuth": []
}
]
}
},
"/users/{username}/repos": {
"get": {
"summary": "List user repositories with pagination",
"operationId": "listUserRepos",
"tags": [
"Repositories"
],
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "per_page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 5
}
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "A list of repositories",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Repository"
}
}
}
}
}
}
}
},
"/users/{username}/following": {
"get": {
"summary": "List users followed by a specific user with pagination",
"operationId": "listUserFollowing",
"tags": [
"User"
],
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "per_page",
"in": "query",
"description": "Number of users per page (max 100).",
"required": false,
"schema": {
"type": "integer",
"default": 5
}
},
{
"name": "page",
"in": "query",
"description": "Page number of the results to fetch.",
"required": false,
"schema": {
"type": "integer",
"default": 1
}
}
],
"responses": {
"200": {
"description": "A list of users followed by the specified user",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
}
}
}
}
},
"security": [
{
"BearerAuth": []
}
]
}
},
"/users/{username}/starred": {
"get": {
"summary": "List repositories starred by a specific user",
"operationId": "listStarredRepositories",
"tags": [
"User Stars"
],
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "sort",
"in": "query",
"description": "One of created or updated. Default: created",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "direction",
"in": "query",
"description": "One of asc or desc. Default: desc",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "A list of repositories starred by the specified user",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Repository"
}
}
}
}
}
},
"security": [
{
"BearerAuth": []
}
]
}
},
"/repos/{owner}/{repo}/commits": {
"get": {
"summary": "List commits in a repository",
"operationId": "listRepositoryCommits",
"tags": [
"Repository Commits"
],
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "sha",
"in": "query",
"description": "SHA or branch to start listing commits from. Default: the repository’s default branch (usually master)",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "path",
"in": "query",
"description": "Only commits containing this file path will be returned",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "since",
"in": "query",
"description": "Only commits after this date will be returned",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "until",
"in": "query",
"description": "Only commits before this date will be returned",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
}
],
"responses": {
"200": {
"description": "A list of commits in the specified repository",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Commit"
}
}
}
}
}
},
"security": [
{
"BearerAuth": []
}
]
}
}
},
"components": {
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
},
"schemas": {
"Repository": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"private": {
"type": "boolean"
},
"owner": {
"type": "object"
},
"html_url": {
"type": "string"
},
"description": {
"type": "string"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"pushed_at": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"size": {
"type": "integer"
},
"stargazers_count": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"language": {
"type": "string"
},
"has_issues": {
"type": "boolean"
},
"has_projects": {
"type": "boolean"
},
"has_downloads": {
"type": "boolean"
},
"has_wiki": {
"type": "boolean"
},
"has_pages": {
"type": "boolean"
},
"forks_count": {
"type": "integer"
},
"mirror_url": {
"type": "string"
},
"archived": {
"type": "boolean"
},
"disabled": {
"type": "boolean"
},
"open_issues_count": {
"type": "integer"
},
"license": {
"type": "object"
},
"forks": {
"type": "integer"
},
"open_issues": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"default_branch": {
"type": "string"
}
}
},
"User": {
"type": "object",
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"node_id": {
"type": "string"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"followers_url": {
"type": "string"
},
"following_url": {
"type": "string"
},
"gists_url": {
"type": "string"
},
"starred_url": {
"type": "string"
},
"subscriptions_url": {
"type": "string"
},
"organizations_url": {
"type": "string"
},
"repos_url": {
"type": "string"
},
"events_url": {
"type": "string"
},
"received_events_url": {
"type": "string"
},
"type": {
"type": "string"
},
"site_admin": {
"type": "boolean"
}
}
}
}
}
}