filter
default

List pull requests that satisfy the query.

Changed on
post/filter/pull_requests

Request

Request body

accountinteger required

Session account ID.

date_fromstring date required

PRs must be updated later than or equal to this date.

date_tostring date required

PRs must be updated earlier than or equal to this date.

timezoneinteger

Local time zone offset in minutes, used to adjust date_from and date_to.

inRepositoryID[] required

Set of repositories. An empty list raises a bad response 400. Duplicates are automatically ignored.

eventsPullRequestEvent[]

Allowed PR events that happened between date_from and date_to.

stagesPullRequestStage[]

Allowed PR stages that are defined at date_to.

labels_includestring[]

At least one of these labels must be present in each returned PR.

labels_excludestring[]

None of these labels must be present in each returned PR.

exclude_inactiveboolean required

Value indicating whether PRs without events in the given time frame shall be ignored.

updated_fromstring date

Paginate the response: the returned PRs are updated on GitHub no older than this timestamp, including the beginning. Note: "updated on GitHub" means that we don´t consider release or deployment timestamps. Use this field only to paginate after calling /paginate/pull_requests. Subject of future changes.

updated_tostring date

Paginate the response: the returned PRs are updated on GitHub no later than this timestamp, not including the ending. Note: "updated on GitHub" means that we don´t consider release or deployment timestamps. Use this field only to paginate after calling /paginate/pull_requests. Subject of future changes.

limitinteger nullable

Maximum number of pull requests to return. The list is sorted by the last update timestamp. null means no limit.

environmentsstring[]

Target environments for the deployment events, impacts events and stages. If omitted, we match any deployment in any environment.

Example request

{
  "account": 1,
  "date_from": "2020-01-23",
  "date_to": "2020-05-23",
  "in": [
    "{1}",
    "github.com/athenianco/athenian-webapp"
  ],
  "stages": [
    "wip"
  ],
  "with": {
    "author": [
      "github.com/vmarkovtsev"
    ]
  },
  "exclude_inactive": true
}

Response

List of pull requests satisfying the specified filters.

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

    • info

      added the new optional request property /

    • 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