Skip to content

[API] Pull Request is null when branch was deleted #6613

@ccaspers

Description

@ccaspers

When a Pull Request was merged, the API endpoint GET /api/v1/repo/<org>/<user>/pulls/<number> returns null as soon as the branch is deleted (see [1]), while the web interface still lists all information about the PR (see [2]). Recreating the branch fixes the issue. The list of all pull-requests shows the same error (see [3]).

This was already reported in #4595, but the issue was closed because there was no activity.

Examples on try.gitea.io:

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedmodifies/apiThis PR adds API routes or modifies themtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions