Skip to content

Automate full PR lifecycle (auto-approve and auto-merge) #3

@MariusStorhaug

Description

Context

The MVP requires a human reviewer to approve and merge managed-file PRs. For a fully hands-off experience, the process should be automated end-to-end so that repo maintainers receive updates without needing to take any action.

Proposal

Automate the full PR lifecycle so that managed-file PRs are approved and merged without manual intervention. This involves:

  1. Marking PRs as ready for review — After the PR is created (and optionally processed by the Copilot agent per Use GitHub Copilot CLI to automate PR title, description, and labels #2), automatically transition the PR from draft to ready for review.
  2. Auto-approval — A second GitHub App (e.g., PSModule's Revo) auto-approves the PR once it is ready for review and required checks are green. A separate app is needed because GitHub does not allow the same identity that creates a PR to also approve it.
  3. Auto-merge — Enable auto-merge on the PR at creation time so it merges automatically once approved and required checks pass.

Design considerations

  • Requires a second GitHub App with pull_requests: write permission for approval.
  • The auto-approve mechanism could be implemented as a reusable workflow, an org-level workflow, or a webhook handler.
  • Need to decide on the trigger: pull_request: [ready_for_review], check_suite: completed, or a combination.
  • Should only trigger for PRs from the managed-files/update branch created by PSModule's Custo.

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions