• 
      

    Guard deletion of the GitHub App record account.

    Review Request #15194 — Created July 23, 2026 and updated — Latest diff uploaded

    Information

    Review Board
    release-9.x

    Reviewers

    Installation accounts reference their hidden app-record account by
    primary key stored in JSON data rather than a database foreign key, so
    nothing at the database level stops the record from being deleted out
    from under them. Deleting it would silently break every installation of
    the app, which authenticates using the record's stored credentials.

    The django admin allows implementing a get_deleted_objects() method in
    order to allow us to prevent this.

    Testing Done:
    Ran unit tests.

    • Attempted to delete the app record and saw that it was protected.
    • Ran unit tests.

    Commits

    Files