Skip to content

Refactor app-installations override to prevent permissions drift #530

@salmanmkc

Description

@salmanmkc

Problem

The override files for /app/installations (get-app-installations.json and .deref.json) use replaceOperation() which replaces the entire operation with a frozen JSON snapshot. This means the permissions block drifts out of sync every time GitHub adds a new permission scope upstream.

This caused #528 where 20 permissions were missing and team_discussions was stale — fixed in #529.

Proposed Solution

Replace the full-operation override with a targeted in-place patch that only fixes the specific anyOf issues (openapi-types.ts#305):

  • items.properties.account — has anyOf with 2 object entries
  • items.properties.suspended_by — has anyOf with null + object entries

This would allow all other fields (including permissions) to flow through from the upstream schema automatically, preventing future drift.

Notes

The same replaceOperation() pattern is used for other endpoints too (gists, checks, pull-request-reviewers, etc.) — those could benefit from similar targeted patching, but the app-installations one is the most impactful since it carries the app-permissions schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🆕 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions