get
default

List pull requests by repository and number.

Changed on
post/get/pull_requests

Request

Request body

accountinteger required

Account ID.

environmentsstring[]

Deployment environments to apply. If omitted, any deployment counts.

Example request

{
  "account": 1,
  "prs": [
    {
      "repository": "github.com/athenianco/athenian-api",
      "numbers": [
        483,
        484,
        485
      ]
    }
  ],
  "environments": [
    "production"
  ]
}

Response

List of pull requests, in the requested order.

Example response

{
  "include": {
    "users": {
      "key": {
        "avatar": "https://avatars0.githubusercontent.com/u/60340680?v=4"
      }
    },
    "deployments": {
      "production-2020-03-26-W9J3uzHl": {
        "components": [
          {
            "repository": "github.com/athenianco/athenian-api",
            "reference": "v0.10.34"
          }
        ],
        "environment": "production",
        "date_finished": "2022-01-23T05:01:07.000+00:00",
        "date_started": "2022-01-23T04:56:07.000+00:00",
        "conclusion": "SUCCESS",
        "labels": {
          "helm_chart": "0.0.67"
        }
      }
    }
  },
  "data": [
    {
      "repository": "github.com/athenianco/athenian-webapp",
      "number": 1111,
      "title": "[DEV-1802] epic search",
      "size_added": 128,
      "size_removed": 30,
      "files_changed": 5,
      "created": "2021-03-02T11:47:42Z",
      "updated": "2021-03-03T13:55:33Z",
      "closed": "2021-03-03T13:55:32Z",
      "comments": 5,
      "commits": 17,
      "review_requested": "2021-03-02T12:14:35Z",
      "first_review": "2021-03-02T15:09:58Z",
      "approved": "2021-03-03T13:15:58Z",
      "review_comments": 2,
      "reviews": 2,
      "merged": "2021-03-03T13:55:32Z",
      "merged_with_failed_check_runs": [
        "Unit tests"
      ],
      "stage_timings": {
        "wip": "12085s",
        "review": "86690s",
        "merge": "2374s",
        "deploy": {
          "production-2020-03-26-W9J3uzHl": "45321s"
        }
      },
      "events_now": [
        "approved",
        "changes_requested",
        "committed",
        "created",
        "merged",
        "review_requested",
        "reviewed",
        "deployed"
      ],
      "stages_now": [
        "done",
        "force_push_dropped",
        "deployed"
      ],
      "participants": [
        {
          "id": "github.com/akbarik",
          "status": [
            "author",
            "commit_author",
            "commit_committer",
            "merger"
          ]
        },
        {
          "id": "github.com/se7entyse7en",
          "status": [
            "reviewer",
            "commenter"
          ]
        },
        {
          "id": "github.com/warenlg",
          "status": [
            "commenter"
          ]
        },
        {
          "id": "github.com/znegrin",
          "status": [
            "commit_author",
            "commit_committer"
          ]
        }
      ],
      "jira": [
        {
          "id": "DEV-1802",
          "title": "FE - Add search capability to Epics table",
          "epic": "DEV-1474",
          "labels": [
            "functionality",
            "webapp"
          ],
          "type": "Task"
        }
      ]
    }
  ]
}

Changes

    • breaking

      the request property's minItems was increased to 1

    • breaking

      the /////// response property's maxLength was unset from 100 for the response status

    • breaking

      the /////// response property's minLength was decreased from 1 to 0 for the response status

    • info

      the /////// response's property pattern ^([^'\s]| ){1,100}$ was added for the status