[Schema Inaccuracy] Pull request field missing from GitHub Actions REST API

Open
#5,070 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions, openapi
Domain
api

Research direction

Start at the OpenAPI definition for the GitHub Actions workflow-run response and compare it with the REST endpoint and supplied run IDs. Check the reported behavior for pull_request, pull_request_target, and push-triggered runs; done means the API description accurately reflects supported pull request data.

Written by the indexing model from the issue text.

Description

documentation

Schema Inaccuracy

Pull request field missing from GitHub Actions REST API

Expected

When an action is triggered by a pull request, the API should contain the pull request.

Reproduction Steps

Issue 1

Pull request field missing from GitHub Actions REST API when the run is trigger by a pull_request, pull_request_target or pull_request_event, whereas a pull request is indeed linked to this action run on UI. This consistently happen with several projects (e.x.,DefinitelyTyped, Adobe-Consulting-Services/acs-aem-commons, alibaba-canal ... and more).

Example:

Repo: kibana
Run ID: 16331561652
PR number: https://github.com/elastic/kibana/pull/228343
Action UI: https://github.com/elastic/kibana/actions/runs/16331561652
Action API: https://api.github.com/repos/elastic/kibana/actions/runs/16331561652

Image Image
Issue 2

There is one repo (1c-syntax/bsl-language-server/) does have the pull request field in their API response, but only when triggered by "push". When triggered by "pull_request_target", the "pull request" field is empty.

Push Example

Repo: https://github.com/1c-syntax/bsl-language-server
UI: https://github.com/1c-syntax/bsl-language-server/actions/runs/15435373094
API: https://api.github.com/repos/1c-syntax/bsl-language-server/actions/runs/15435373094

Image Image
Pull request target example

UI:https://github.com/1c-syntax/bsl-language-server/actions/runs/15040558459
API:https://api.github.com/repos/1c-syntax/bsl-language-server/actions/runs/15040558459

Image Image
Dominant language
No language data
Stars
1.6k
Forks
342
Avg merge
3h 33m
Merged PRs (30d)
51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/rest-api-description

All issues in github/rest-api-description

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.