• 
      

    Guard deletion of the GitHub App record account.

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

    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.
    Summary ID
    Guard deletion of the GitHub App record account.
    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.
    wmqqtrnulwzukrppwumnnmszmqprzqxp
    Checks run (2 succeeded)
    flake8 passed.
    JSHint passed.
    maubin
    1. Ship It!
    2.