Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwei37 committed Jun 13, 2023
1 parent 0f6bc7b commit ae4e06c
Show file tree
Hide file tree
Showing 3 changed files with 357 additions and 65 deletions.
26 changes: 9 additions & 17 deletions public/.well-known/ai-plugin.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
{
"schema_version": "v1",
"name_for_human": "Chat with Code",
"name_for_model": "code_repo_interaction",
"description_for_human": "Interact with code repositories, manage issues, and push code.",
"description_for_model": "Provides the ability to interact with hosted code repositories, access files, modify code, and discuss code implementation. Users can perform tasks like fetching file contents, proposing code changes, and discussing code implementation. For example, you can use commands like 'list repositories for user', 'create issue', and 'get readme'. Thoroughly review the data in the response before crafting your answer.",
"name_for_human": "Github Stat Plugin",
"name_for_model": "githubStat",
"description_for_human": "Fetch, analyze, and display Github repo and users data.",
"description_for_model": "Plugin for managing the retrieval of statistics and information about GitHub repositories or users. Capabilities include fetching detailed repository data, user data, pull request data, issue data, and other related Github statistics.",
"auth": {
"type": "oauth",
"client_url": "https://gh-plugin.teammait.com/",
"scope": "repo",
"authorization_url": "https://gh-plugin.teammait.com/api/token",
"authorization_content_type": "application/json",
"verification_tokens": {
"openai": "fd66b2f40df541bb9ee79db7b2085589"
}
"type": "none"
},
"api": {
"type": "openapi",
"url": "https://gh-plugin.teammait.com/.well-known/openapi.yaml",
"is_user_authenticated": false
"url": "https://chat-gpt-github-stat-plugin.vercel.app/openapi.yaml"
},
"logo_url": "https://gh-plugin.teammait.com/logo.png",
"contact_email": "albs@teammait.com",
"legal_info_url": "https://gh-plugin.teammait.com/terms"
"logo_url": "https://chat-gpt-github-stat-plugin.vercel.app/logo.png",
"contact_email": "support@example.com",
"legal_info_url": "http://www.example.com/legal"
}
323 changes: 275 additions & 48 deletions public/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,73 +1,300 @@
openapi: 3.0.1
info:
title: TODO Plugin
description: A plugin that allows the user to create and manage a TODO list using ChatGPT.
version: 'v1'
version: "v1"
title: "ChatGPT Github Stat Plugin API"
description: "This is the API specification for the ChatGPT Github Stat Plugin. It provides endpoints to retrieve statistics and information for a GitHub user or a specific GitHub repository."
servers:
- url: https://chat-gpt-github-stat-plugin.vercel.app
- url: "https://chat-gpt-github-stat-plugin.vercel.app"
paths:
/api/todos:
/api/github/{owner}:
get:
operationId: getTodos
summary: Get the list of todos
summary: "Get GitHub user information"
description: "Retrieve statistics and information for a GitHub user."
parameters:
- in: path
name: owner
required: true
description: GitHub username.
schema:
type: string
responses:
"200":
description: OK
description: "Successfully retrieved user information."
content:
application/json:
schema:
$ref: '#/components/schemas/getTodosResponse'
/api/create-todo:
post:
operationId: addTodo
summary: add a new todo
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/addTodoRequest'
responses:
"200":
description: OK
/api/delete-todo:
post:
operationId: deleteTodo
summary: delete a todo
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/deleteTodoRequest'
$ref: "#/components/schemas/User"
/api/github/{owner}/{repo}:
get:
summary: "Get GitHub repository information"
description: "Retrieve statistics and information for a specific GitHub repository."
parameters:
- in: path
name: owner
required: true
description: GitHub username.
schema:
type: string
- in: path
name: repo
required: true
description: GitHub repository name.
schema:
type: string
responses:
"200":
description: OK
description: "Successfully retrieved repository information."
content:
application/json:
schema:
$ref: "#/components/schemas/Repo"
components:
schemas:
deleteTodoRequest:
User:
type: object
required:
- todo
properties:
todo:
html_url:
type: string
description: The todo to delete from the list.
required: true
addTodoRequest:
description: The HTML URL of the user's GitHub profile.
type:
type: string
description: The type of GitHub account.
name:
type: string
description: The name of the GitHub user.
company:
type: string
description: The company that the GitHub user is associated with.
blog:
type: string
description: The URL of the user's blog.
location:
type: string
description: The location of the GitHub user.
email:
type: string
nullable: true
description: The email of the GitHub user.
hireable:
type: boolean
description: Whether the user is hireable or not.
bio:
type: string
description: The biography of the GitHub user.
twitter_username:
type: string
description: The Twitter username of the GitHub user.
public_repos:
type: integer
description: The number of public repositories of the GitHub user.
public_gists:
type: integer
description: The number of public gists of the GitHub user.
followers:
type: integer
description: The number of followers of the GitHub user.
following:
type: integer
description: The number of people the GitHub user is following.
created_at:
type: string
format: date-time
description: The creation date and time of the GitHub user's account.
updated_at:
type: string
format: date-time
description: The update date and time of the GitHub user's account.
totalPRs:
type: integer
description: The total number of pull requests by the GitHub user.
totalCommits:
type: integer
description: The total number of commits by the GitHub user.
totalIssues:
type: integer
description: The total number of issues opened by the GitHub user.
totalStars:
type: integer
description: The total number of stars received by the GitHub user's repositories.
contributedTo:
type: integer
description: The number of repositories the GitHub user has contributed to.
rank:
$ref: '#/components/schemas/Rank'
mostStarredRepos:
type: array
items:
type: string
description: List of the user's most starred repositories.

Rank:
type: object
required:
- todo
properties:
todo:
level:
type: string
description: The todo to add to the list.
required: true
getTodosResponse:
description: The level of the GitHub user's rank.
percentile:
type: number
format: double
description: The percentile of the GitHub user's rank.
Repo:
type: object
properties:
todos:
name:
type: string
description: The name of the repository.
full_name:
type: string
description: The full name of the repository.
private:
type: boolean
description: Indicates if the repository is private.
owner:
type: object
description: The owner of the repository.
properties:
login:
type: string
type:
type: string
site_admin:
type: boolean
html_url:
type: string
description: The HTML URL of the repository.
description:
type: string
description: The description of the repository.
fork:
type: boolean
description: Indicates if the repository is a fork.
svn_url:
type: string
description: The SVN URL of the repository.
created_at:
type: string
format: date-time
description: The creation time of the repository.
updated_at:
type: string
format: date-time
description: The last update time of the repository.
pushed_at:
type: string
format: date-time
description: The last push time of the repository.
homepage:
type: string
description: The homepage of the repository.
size:
type: integer
description: The size of the repository.
stargazers_count:
type: integer
description: The count of stargazers of the repository.
watchers_count:
type: integer
description: The count of watchers of the repository.
language:
type: string
description: The primary language of the repository.
has_issues:
type: boolean
description: Indicates if the repository has issues enabled.
has_projects:
type: boolean
description: Indicates if the repository has projects enabled.
has_downloads:
type: boolean
description: Indicates if the repository has downloads enabled.
has_wiki:
type: boolean
description: Indicates if the repository has wiki enabled.
has_pages:
type: boolean
description: Indicates if the repository has GitHub pages enabled.
has_discussions:
type: boolean
description: Indicates if the repository has discussions enabled.
forks_count:
type: integer
description: The count of forks of the repository.
mirror_url:
type: string
description: The mirror URL of the repository.
archived:
type: boolean
description: Indicates if the repository is archived.
disabled:
type: boolean
description: Indicates if the repository is disabled.
open_issues_count:
type: integer
description: The count of open issues in the repository.
license:
type: object
description: The license of the repository.
properties:
key:
type: string
name:
type: string
spdx_id:
type: string
url:
type: string
node_id:
type: string
allow_forking:
type: boolean
description: Indicates if forking is allowed for the repository.
is_template:
type: boolean
description: Indicates if the repository is a template.
web_commit_signoff_required:
type: boolean
description: Indicates if web commit signoff is required for the repository.
topics:
type: array
items:
type: string
description: The list of todos.
description: The topics of the repository.
visibility:
type: string
description: The visibility of the repository.
forks:
type: integer
description: The number of forks of the repository.
open_issues:
type: integer
description: The number of open issues in the repository.
watchers:
type: integer
description: The number of watchers of the repository.
default_branch:
type: string
description: The default branch of the repository.
temp_clone_token:
type: string
description: The temporary clone token of the repository.
network_count:
type: integer
description: The network count of the repository.
subscribers_count:
type: integer
description: The subscribers count of the repository.
stargazerData:
type: array
items:
type: object
properties:
date:
type: string
format: date-time
count:
type: integer
tag:
type: string
readme:
type: string
description: The README of the repository.
Loading

1 comment on commit ae4e06c

@vercel
Copy link

@vercel vercel bot commented on ae4e06c Jun 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.