Skip to content

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

Closed
@ccaspers

Description

@ccaspers
  • Gitea version (or commit ref): 3b612ce
  • Git version: 2.20.1
  • Operating system: Linux
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

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