Skip to content

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

@sungengyi

Description

@sungengyi

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: elastic/kibana#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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions