Skip to content

refactor(github-app): extract a shared withAuthorizedPrAction scaffold for action commands #824

Description

@JSONbored

Surfaced by the #538 analysis. maybeProcessPrPanelRetrigger and the new maybeProcessGateOverrideCommand (#538) share ~80% boilerplate: resolve real repo permission → authorize → load PR/settings → build advisory → audit → product-usage. As #778 (auto-maintain) adds more action commands (auto-merge/close/request-changes), this duplication is a consistency + safety risk (each new action command must independently get the real-permission auth right).

Deliverable

Why it matters

Centralizes the real-permission authorization so no future action command can accidentally fall back to the spoofable author_association (the #788 hazard). Relates #778, #769, #788, #538.

Context

src/queue/processors.ts (maybeProcessPrPanelRetrigger ~1432, maybeProcessGateOverrideCommand new), resolveRealRepoPermissionAssociation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    roadmapOn the Wave-2 agent-layer roadmap board (project 9)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions