engineering_analytics
engineering_analytics

Pull requests as timelines of what each waited on from ready for review to merge or now: review, CI, red checks by what turned them green, and the merge queue. Scope to one author or one GitHub team (open PRs plus PRs merged in the window, date_from default -30d), or to one pull request with pr_number and repo.

get/api/projects/{project_id}/engineering_analytics/pull_request_timelines/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/engineering_analytics/pull_request_timelines/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Query parameters

authorstring

GitHub login: scope the read to this author's pull requests. Pass exactly one scope.

date_fromstring

Window start: relative ('-30d', '-8w') or ISO8601. Defaults to -30d.

date_tostring

Window end: relative or ISO8601. Defaults to now.

github_teamstring

GitHub team slug: scope the read to pull requests authored by the team's members, through the team membership table. Pass exactly one scope.

pr_numberinteger

Pull request number: scope the read to this one pull request. Needs repo. Pass exactly one scope.

repostring

'owner/name' repository. Required with pr_number; otherwise it picks the repository when the selected source syncs several.

source_idstring uuid

Connected GitHub data warehouse source to read from. Defaults to the oldest connected GitHub source when the team has more than one.

Response

scope_kind'author' | 'github_team' | 'pull_request' required
  • author - Author
  • github_team - GitHub Team
  • pull_request - Pull Request
scopestring required

The GitHub login, GitHub team slug, or 'owner/name#number' the timelines are for.

has_membership_databoolean required

True when the team membership table is synced. A github_team scope without it lists no pull requests.

review_data_availableboolean required

False when reviews aren't synced: review stretches read review_state_unknown.

jobs_availableboolean required

False when workflow jobs aren't synced: a check a re-run turned green is not visible, and no red stretch reads red_master_broken.

merge_queue_state_availableboolean required

True when the Trunk merge-queue table is synced, so out_of_merge_queue can appear.

generated_atstring date-time required

The now every open PR's timeline ends at.

merged_pr_countinteger required

Every pull request merged in the selected scope and window.

truncatedboolean required

True when more PRs matched than the limit.

limitinteger required

The maximum number of PRs returned.

Changes

No recorded changes to this operation across all 1 revision of this API.