GiteaHat
  1. repository
GiteaHat
  • Gitea接口
    • activitypub
      • Returns the Person actor for a user
      • Send to the inbox
    • admin
      • List cron tasks
      • Run cron task
      • List all organizations
      • List unadopted repositories
      • Adopt unadopted files as a repository
      • Delete unadopted files
      • Search users according filter conditions
      • Create a user
      • Delete a user
      • Edit an existing user
      • Add a public key on behalf of a user
      • Delete a user's public key
      • Create an organization
      • Create a repository on behalf of a user
    • miscellaneous
      • Render a markdown document as HTML
      • Render raw markdown as HTML
      • Returns the nodeinfo of the Gitea application
      • Get default signing-key.gpg
      • Returns the version of the Gitea application
    • notification
      • List users's notification threads
      • Mark notification threads as read, pinned or unread
      • Check if unread notifications exist
      • Get notification thread by ID
      • Mark notification thread as read by ID
      • List users's notification threads on a specific repo
      • Mark notification threads as read, pinned or unread on a specific repo
    • organization
      • Create a repository in an organization
      • Get list of organizations
      • Create an organization
      • Get an organization
      • Delete an organization
      • Edit an organization
      • List an organization's webhooks
      • Create a hook
      • Get a hook
      • Delete a hook
      • Update a hook
      • List an organization's labels
      • Create a label for an organization
      • Get a single label
      • Delete a label
      • Update a label
      • List an organization's members
      • Check if a user is a member of an organization
      • Remove a member from an organization
      • List an organization's public members
      • Check if a user is a public member of an organization
      • Publicize a user's membership
      • Conceal a user's membership
      • List an organization's repos
      • Create a repository in an organization
      • List an organization's teams
      • Create a team
      • Search for teams within an organization
      • Get a team
      • Delete a team
      • Edit a team
      • List a team's members
      • List a particular member of team
      • Add a team member
      • Remove a team member
      • List a team's repos
      • List a particular repo of team
      • Add a repository to a team
      • Remove a repository from a team
      • List the current user's organizations
      • List a user's organizations
      • Get user permissions in organization
    • package
      • Gets all packages of an owner
      • Gets a package
      • Delete a package
      • Gets all files of a package
    • issue
      • Search for issues across the repositories that the user has access to
      • List a repository's issues
      • Create an issue. If using deadline only the date will be taken into account, and time of day ignored.
      • List all comments in a repository
      • Get a comment
      • Delete a comment
      • Edit a comment
      • Get a list of reactions from a comment of an issue
      • Add a reaction to a comment of an issue
      • Remove a reaction from a comment of an issue
      • Get an issue
      • Delete an issue
      • Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.
      • List all comments on an issue
      • Add a comment to an issue
      • Delete a comment
      • Edit a comment
      • Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.
      • Get an issue's labels
      • Replace an issue's labels
      • Add a label to an issue
      • Remove all labels from an issue
      • Remove a label from an issue
      • Get a list reactions of an issue
      • Add a reaction to an issue
      • Remove a reaction from an issue
      • Delete an issue's existing stopwatch.
      • Start stopwatch on an issue.
      • Stop an issue's existing stopwatch.
      • Get users who subscribed on an issue.
      • Check if user is subscribed to an issue
      • Subscribe user to issue
      • Unsubscribe user from issue
      • List all comments and events on an issue
      • List an issue's tracked times
      • Add tracked time to a issue
      • Reset a tracked time of an issue
      • Delete specific tracked time
      • Get all of a repository's labels
      • Create a label
      • Get a single label
      • Delete a label
      • Update a label
      • Get all of a repository's opened milestones
      • Create a milestone
      • Get a milestone
      • Delete a milestone
      • Update a milestone
    • repository
      • Migrate a remote git repository
      • Search for repositories
      • Get a repository
      • Delete a repository
      • Edit a repository's properties. Only fields that are set will be changed.
      • Get an archive of a repository
      • Return all users that have write access and can be assigned to issues
      • List branch protections for a repository
      • Create a branch protections for a repository
      • Get a specific branch protection for the repository
      • Delete a specific branch protection for the repository
      • Edit a branch protections for a repository. Only fields that are set will be changed
      • List a repository's branches
      • Create a branch
      • Retrieve a specific branch from a repository, including its effective branch protection
      • Delete a specific branch from a repository
      • List a repository's collaborators
      • Check if a user is a collaborator of a repository
      • Add a collaborator to a repository
      • Delete a collaborator from a repository
      • Get repository permissions for a user
      • Get a list of all commits from a repository
      • Get a commit's combined status, by branch/tag/commit reference
      • Get a commit's statuses, by branch/tag/commit reference
      • Gets the metadata of all the entries of the root dir
      • Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir
      • Update a file in a repository
      • Create a file in a repository
      • Delete a file in a repository
      • Apply diff patch to repository
      • Get the EditorConfig definitions of a file in a repository
      • List a repository's forks
      • Fork a repository
      • Gets the blob of a repository.
      • Get a single commit from a repository
      • Get a commit's diff or patch
      • Get a note corresponding to a single commit from a repository
      • Get specified ref or filtered repository's refs
      • Get specified ref or filtered repository's refs
      • Gets the tag object of an annotated tag (not lightweight tags)
      • Gets the tree of a repository.
      • List the hooks in a repository
      • Create a hook
      • List the Git hooks in a repository
      • Get a Git hook
      • Delete a Git hook in a repository
      • Edit a Git hook in a repository
      • Get a hook
      • Delete a hook in a repository
      • Edit a hook in a repository
      • Test a push webhook
      • Get available issue templates for a repository
      • List a repository's keys
      • Add a key to a repository
      • Get a repository's key by id
      • Delete a key from a repository
      • Get languages and number of bytes of code written
      • Get a file or it's LFS object from a repository
      • Sync a mirrored repository
      • List a repo's pull requests
      • Create a pull request
      • Get a pull request
      • Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.
      • Get a pull request diff or patch
      • Get commits for a pull request
      • Check if a pull request has been merged
      • Merge a pull request
      • Cancel the scheduled auto merge for the given pull request
      • create review requests for a pull request
      • cancel review requests for a pull request
      • List all reviews for a pull request
      • Create a review to an pull request
      • Get a specific review for a pull request
      • Submit a pending review to an pull request
      • Delete a specific review from a pull request
      • Get a specific review for a pull request
      • Dismiss a review for a pull request
      • Cancel to dismiss a review for a pull request
      • Merge PR's baseBranch into headBranch
      • Get all push mirrors of the repository
      • add a push mirror to the repository
      • Sync all push mirrored repository
      • Get push mirror of the repository by remoteName
      • deletes a push mirror from a repository by remoteName
      • Get a file from a repository
      • List a repo's releases
      • Create a release
      • Get changed files for a pull request
      • Get a release by tag name
      • Delete a release by tag name
      • Get a release
      • Delete a release
      • Update a release
      • List release's attachments
      • Create a release attachment
      • Get a release attachment
      • Delete a release attachment
      • Edit a release attachment
      • Return all users that can be requested to review in this repo
      • Get signing-key.gpg for given repository
      • List a repo's stargazers
      • Get a commit's statuses
      • Create a commit status
      • List a repo's watchers
      • Check if the current user is watching a repo
      • Watch a repo
      • Unwatch a repo
      • List a repository's tags
      • Create a new git tag in a repository
      • Get the tag of a repository by tag name
      • Delete a repository's tag by name
      • List a repository's teams
      • Check if a team is assigned to a repository
      • Add a team to a repository
      • Delete a team from a repository
      • List a repo's tracked times
      • List a user's tracked times in a repo
      • Get list of topics that a repository has
      • Replace list of topics for a repository
      • Add a topic to a repository
      • Delete a topic from a repository
      • Transfer a repo ownership
      • Accept a repo transfer
      • Reject a repo transfer
      • Create a wiki page
      • Get a wiki page
      • Delete a wiki page
      • Edit a wiki page
      • Get all wiki pages
      • Get revisions of a wiki page
      • Create a repository using a template
      • Get a repository by id
      • search topics via keyword
      • Create a repository
    • settings
      • Get instance's global settings for api
      • Get instance's global settings for Attachment
      • Get instance's global settings for repositories
      • Get instance's global settings for ui
    • user
      • Get the authenticated user
      • List the authenticated user's oauth2 applications
      • creates a new OAuth2 application
      • get an OAuth2 Application
      • delete an OAuth2 Application
      • update an OAuth2 Application, this includes regenerating the client secret
      • List the authenticated user's email addresses
      • Add email addresses
      • Delete email addresses
      • List the authenticated user's followers
      • List the users that the authenticated user is following
      • Check whether a user is followed by the authenticated user
      • Follow a user
      • Unfollow a user
      • Get a Token to verify
      • Verify a GPG key
      • List the authenticated user's GPG keys
      • Create a GPG key
      • Get a GPG key
      • Remove a GPG key
      • List the authenticated user's public keys
      • Create a public key
      • Get a public key
      • Delete a public key
      • List the repos that the authenticated user owns
      • Get user settings
      • Update user settings
      • The repos that the authenticated user has starred
      • Whether the authenticated is starring the repo
      • Star the given repo
      • Unstar the given repo
      • Get list of all existing stopwatches
      • List repositories watched by the authenticated user
      • List all the teams a user belongs to
      • List the current user's tracked times
      • Search for users
      • Get a user
      • List the given user's followers
      • List the users that the given user is following
      • Check if one user is following another user
      • List the given user's GPG keys
      • Get a user's heatmap
      • List the given user's public keys
      • List the repos owned by the given user
      • The repos that the given user has starred
      • List the repositories watched by a user
      • List the authenticated user's access tokens
      • Create an access token
      • delete an access token
  • Hat拓展接口
    • repository
      • actions
        • 获取流水线文件列表
        • 获取流水线任务列表
        • 重新启动流水线任务
        • 重新启动全部流水线任务
        • 禁用流水线
        • 恢复流水线
        • 下载流水线日志
        • 启动流水线任务
      • 获取仓库所有文件文件夹
        GET
      • 获取仓库路径下所有文件文件夹
        GET
      • 仓库内搜索文件
        GET
      • 获取单个commit内容
        GET
      • 获取单个commit的dif内容
        GET
      • 创建一个webhook
        POST
      • 获取一个webhook推送历史
        GET
      • Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at
        GET
      • 获取所有的发行版
        GET
      • 获取一个发行版
        GET
      • 创建一个发行版
        POST
      • 更新一个发行版
        PATCH
      • 获取所有分支名称
        GET
      • 获取所有分支 (按类型分组)
        GET
      • 获取所有标签名称
        GET
      • 获取所有标签
        GET
      • 获取仓库分支、标签数量
        GET
      • 获取仓库readme文件内容
        GET
      • 获取仓库目录下readme文件内容
        GET
      • 获取所有commits(按时间分组)
        GET
      • 获取仓库贡献者
        GET
      • 获取仓库commit数量、标签数量、分支数量、发行版数量(按分支)
        GET
      • 获取文件或文件夹下的commit列表
        GET
      • 获取仓库blame内容
        GET
      • 分支、标签、commit的比较接口
        GET
      • 迁移项目(直接)
        POST
      • 获取一个合并请求
        GET
      • 获取合并请求下的commit列表
        GET
      • Get changed files for a pull request
        GET
      • 仓库下批量更改文件(创建、更新、删除)
        POST
      • 获取合并请求下所有版本记录
        GET
      • 获取合并请求下一个版本记录的diff内容
        GET
      • 获取仓库代码贡献情况
        GET
      • 获取所有分支
        GET
      • 获取仓库贡献者(包括代码行)
        GET
      • 恢复一个已删除分支
        POST
      • 获取最近的commit列表
        GET
      • 删除一个仓库
        DELETE
    • organization
      • 创建一个组织
      • 团队添加所有组织项目
      • 团队移除所有组织项目
      • 编辑一个组织
    • users
      • 获取用户贡献记录(按时间)
    • admin
      • 编辑一个用户
  1. repository

获取一个合并请求

开发中
GET
/repos/{owner}/{repo}/pulls/{index}

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Basic 之后拼接空格,以及经过 Base64 编码的 username:password
示例:
Authorization: Basic *****************
Path 参数
owner
string 
必需
repo
string 
必需
index
string 
必需

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET '/repos///pulls/' \
--header 'Authorization: Basic Og=='

返回响应

🟢200成功
application/json
Body
id
integer 
必需
url
string 
必需
number
integer 
必需
user
object 
必需
id
integer 
必需
login
string 
必需
full_name
string 
必需
email
string 
必需
avatar_url
string 
必需
language
string 
必需
is_admin
boolean 
必需
last_login
string 
必需
created
string 
必需
restricted
boolean 
必需
active
boolean 
必需
prohibit_login
boolean 
必需
location
string 
必需
website
string 
必需
description
string 
必需
visibility
string 
必需
followers_count
integer 
必需
following_count
integer 
必需
starred_repos_count
integer 
必需
username
string 
必需
title
string 
必需
body
string 
必需
labels
array[string]
必需
milestone
null 
必需
assignee
null 
必需
assignees
null 
必需
state
string 
必需
is_locked
boolean 
必需
comments
integer 
必需
html_url
string 
必需
diff_url
string 
必需
patch_url
string 
必需
mergeable
boolean 
必需
merged
boolean 
必需
merged_at
null 
必需
merge_commit_sha
null 
必需
merged_by
null 
必需
allow_maintainer_edit
boolean 
必需
base
object 
必需
label
string 
必需
ref
string 
必需
sha
string 
必需
repo_id
integer 
必需
repo
object 
必需
head
object 
必需
label
string 
必需
ref
string 
必需
sha
string 
必需
repo_id
integer 
必需
repo
object 
必需
merge_base
string 
必需
due_date
null 
必需
created_at
string 
必需
updated_at
string 
必需
closed_at
null 
必需
commit_num
integer 
必需
changed_files
integer 
必需
示例
{
    "id": 1,
    "url": "http://127.0.0.1:10082/yystopf/ceshi/pulls/1",
    "number": 1,
    "user": {
        "id": 2,
        "login": "yystopf",
        "full_name": "yystopf",
        "email": "yystopf@example.com",
        "avatar_url": "http://127.0.0.1:10082/avatar/b47599871ff0cecde7aba7c61bb41464",
        "language": "",
        "is_admin": false,
        "last_login": "0001-01-01T00:00:00Z",
        "created": "2022-10-13T10:12:54+08:00",
        "restricted": false,
        "active": false,
        "prohibit_login": false,
        "location": "",
        "website": "",
        "description": "",
        "visibility": "public",
        "followers_count": 0,
        "following_count": 0,
        "starred_repos_count": 0,
        "username": "yystopf"
    },
    "title": "添加 '新建一个文件'",
    "body": "12312",
    "labels": [],
    "milestone": null,
    "assignee": null,
    "assignees": null,
    "state": "open",
    "is_locked": false,
    "comments": 0,
    "html_url": "http://127.0.0.1:10082/yystopf/ceshi/pulls/1",
    "diff_url": "http://127.0.0.1:10082/yystopf/ceshi/pulls/1.diff",
    "patch_url": "http://127.0.0.1:10082/yystopf/ceshi/pulls/1.patch",
    "mergeable": true,
    "merged": false,
    "merged_at": null,
    "merge_commit_sha": null,
    "merged_by": null,
    "allow_maintainer_edit": false,
    "base": {
        "label": "main",
        "ref": "main",
        "sha": "617c821088403a55f7503ea9343670f1fd51b60c",
        "repo_id": 5,
        "repo": {
            "id": 5,
            "owner": {
                "id": 2,
                "login": "yystopf",
                "full_name": "yystopf",
                "email": "yystopf@example.com",
                "avatar_url": "http://127.0.0.1:10082/avatar/b47599871ff0cecde7aba7c61bb41464",
                "language": "",
                "is_admin": false,
                "last_login": "0001-01-01T00:00:00Z",
                "created": "2022-10-13T10:12:54+08:00",
                "restricted": false,
                "active": false,
                "prohibit_login": false,
                "location": "",
                "website": "",
                "description": "",
                "visibility": "public",
                "followers_count": 0,
                "following_count": 0,
                "starred_repos_count": 0,
                "username": "yystopf"
            },
            "name": "ceshi",
            "full_name": "yystopf/ceshi",
            "description": "",
            "empty": false,
            "private": true,
            "fork": false,
            "template": false,
            "parent": null,
            "mirror": false,
            "size": 34,
            "language": "",
            "languages_url": "http://127.0.0.1:10082/api/v1/repos/yystopf/ceshi/languages",
            "html_url": "http://127.0.0.1:10082/yystopf/ceshi",
            "ssh_url": "virus@127.0.0.1:yystopf/ceshi.git",
            "clone_url": "http://127.0.0.1:10082/yystopf/ceshi.git",
            "original_url": "",
            "website": "",
            "stars_count": 0,
            "forks_count": 0,
            "watchers_count": 1,
            "open_issues_count": 0,
            "open_pr_counter": 1,
            "release_counter": 0,
            "default_branch": "main",
            "archived": false,
            "created_at": "2022-10-31T10:26:36+08:00",
            "updated_at": "2022-11-28T16:32:04+08:00",
            "permissions": {
                "admin": true,
                "push": true,
                "pull": true
            },
            "has_issues": true,
            "internal_tracker": {
                "enable_time_tracker": true,
                "allow_only_contributors_to_track_time": true,
                "enable_issue_dependencies": true
            },
            "has_wiki": true,
            "has_pull_requests": true,
            "has_projects": true,
            "ignore_whitespace_conflicts": false,
            "allow_merge_commits": true,
            "allow_rebase": true,
            "allow_rebase_explicit": true,
            "allow_squash_merge": true,
            "default_merge_style": "merge",
            "avatar_url": "",
            "internal": false,
            "mirror_interval": "",
            "mirror_updated": "0001-01-01T00:00:00Z",
            "repo_transfer": null
        }
    },
    "head": {
        "label": "yystopf-patch-1",
        "ref": "yystopf-patch-1",
        "sha": "f5f6854c560828ae0d9ac02e5b52810c0c3b180b",
        "repo_id": 5,
        "repo": {
            "id": 5,
            "owner": {
                "id": 2,
                "login": "yystopf",
                "full_name": "yystopf",
                "email": "yystopf@example.com",
                "avatar_url": "http://127.0.0.1:10082/avatar/b47599871ff0cecde7aba7c61bb41464",
                "language": "",
                "is_admin": false,
                "last_login": "0001-01-01T00:00:00Z",
                "created": "2022-10-13T10:12:54+08:00",
                "restricted": false,
                "active": false,
                "prohibit_login": false,
                "location": "",
                "website": "",
                "description": "",
                "visibility": "public",
                "followers_count": 0,
                "following_count": 0,
                "starred_repos_count": 0,
                "username": "yystopf"
            },
            "name": "ceshi",
            "full_name": "yystopf/ceshi",
            "description": "",
            "empty": false,
            "private": true,
            "fork": false,
            "template": false,
            "parent": null,
            "mirror": false,
            "size": 34,
            "language": "",
            "languages_url": "http://127.0.0.1:10082/api/v1/repos/yystopf/ceshi/languages",
            "html_url": "http://127.0.0.1:10082/yystopf/ceshi",
            "ssh_url": "virus@127.0.0.1:yystopf/ceshi.git",
            "clone_url": "http://127.0.0.1:10082/yystopf/ceshi.git",
            "original_url": "",
            "website": "",
            "stars_count": 0,
            "forks_count": 0,
            "watchers_count": 1,
            "open_issues_count": 0,
            "open_pr_counter": 1,
            "release_counter": 0,
            "default_branch": "main",
            "archived": false,
            "created_at": "2022-10-31T10:26:36+08:00",
            "updated_at": "2022-11-28T16:32:04+08:00",
            "permissions": {
                "admin": true,
                "push": true,
                "pull": true
            },
            "has_issues": true,
            "internal_tracker": {
                "enable_time_tracker": true,
                "allow_only_contributors_to_track_time": true,
                "enable_issue_dependencies": true
            },
            "has_wiki": true,
            "has_pull_requests": true,
            "has_projects": true,
            "ignore_whitespace_conflicts": false,
            "allow_merge_commits": true,
            "allow_rebase": true,
            "allow_rebase_explicit": true,
            "allow_squash_merge": true,
            "default_merge_style": "merge",
            "avatar_url": "",
            "internal": false,
            "mirror_interval": "",
            "mirror_updated": "0001-01-01T00:00:00Z",
            "repo_transfer": null
        }
    },
    "merge_base": "617c821088403a55f7503ea9343670f1fd51b60c",
    "due_date": null,
    "created_at": "2022-11-28T16:32:12+08:00",
    "updated_at": "2022-11-28T16:32:12+08:00",
    "closed_at": null,
    "commit_num": 1,
    "changed_files": 1
}
🟠404记录不存在
上一页
迁移项目(直接)
下一页
获取合并请求下的commit列表
Built with