v11

OpenAPI 3.0.3raw.githubusercontent.com2024-01-1200163.6 KB
Pull Request Creators

List pull request creators

Querying the pull request creators list in a given repository.

This API provides multiple ways to sort the query results, for example:

  • sort=prs-desc (Default): Sorted in descending order based on prs field (the number of PRs they have contributed), meaning that the contributor with the most PRs is at the top.
  • sort=first_pr_merged_at-desc: Sorted in descending order based on first_pr_merged_at field (the time of their first merged PR), which means you can got a list of new code contributors of the repository.
get/repos/{owner}/{repo}/pull_request_creators/

Path parameters

ownerstring required

The owner of the repo.

repostring required

The name of the repo.

Query parameters

sort'login' | 'prs' | 'prs-desc' | 'first_pr_opened_at' | 'first_pr_opened_at-desc' | 'first_pr_merged_at' | 'first_pr_merged_at-desc'

Specify the field by which to sort the pull request creators list (values with a -desc suffix indicate descending sorting)

exclude_botsboolean

Whether to exclude robot accounts (includes GitHub App and normal users whose username matches the pattern, for example: ti-chi-bot).

pageinteger

Page number of the results to fetch.

page_sizeinteger

The number of results per page (max 100).

Response

Default Response

type'sql_endpoint' required

The type of the endpoint.

Example response

{
  "type": "sql_endpoint",
  "data": {
    "columns": [
      {
        "col": "id",
        "data_type": "INT",
        "nullable": false
      },
      {
        "col": "login",
        "data_type": "VARCHAR",
        "nullable": false
      },
      {
        "col": "name",
        "data_type": "VARCHAR",
        "nullable": false
      },
      {
        "col": "prs",
        "data_type": "INT",
        "nullable": true
      },
      {
        "col": "first_pr_opened_at",
        "data_type": "DATETIME",
        "nullable": true
      },
      {
        "col": "first_pr_merged_at",
        "data_type": "DATETIME",
        "nullable": true
      }
    ],
    "rows": [
      {
        "id": "1420062",
        "login": "tiancaiamao",
        "name": "",
        "prs": "1300",
        "first_pr_opened_at": "2016-06-20 14:08:39",
        "first_pr_merged_at": "2016-06-21 07:45:27"
      },
      {
        "id": "3427324",
        "login": "hawkingrei",
        "name": "Weizhen Wang",
        "prs": "927",
        "first_pr_opened_at": "2017-05-17 15:00:50",
        "first_pr_merged_at": "2017-05-22 04:47:11"
      },
      {
        "id": "26020263",
        "login": "crazycs520",
        "name": "crazycs",
        "prs": "788",
        "first_pr_opened_at": "2018-06-12 05:02:07",
        "first_pr_merged_at": "2018-06-29 03:01:35"
      },
      {
        "id": "891222",
        "login": "coocood",
        "name": "Evan Zhou",
        "prs": "779",
        "first_pr_opened_at": "2015-09-06 05:58:15",
        "first_pr_merged_at": "2015-09-06 07:10:13"
      },
      {
        "id": "4242506",
        "login": "zimulala",
        "name": "Lynn",
        "prs": "774",
        "first_pr_opened_at": "2015-09-06 10:51:19",
        "first_pr_merged_at": "2015-09-06 12:32:33"
      }
    ],
    "result": {
      "code": 200,
      "message": "Query OK!",
      "start_ms": 1690957407469,
      "end_ms": 1690957407499,
      "latency": "30ms",
      "row_count": 5,
      "row_affect": 0,
      "limit": 50,
      "databases": [
        "gharchive_dev"
      ]
    }
  }
}