Back to tips
    How to Use Finalize: Publishing Your Draft PR

    How to Use Finalize: Publishing Your Draft PR

    Introduction

    When all phases of Dev Run complete, a draft PR is created on GitHub. However, this draft PR cannot be merged as-is.

    That's where Finalize comes in. Finalize converts a reviewed draft PR into a public PR, making it merge-ready.

    Why is this step necessary? It's rooted in DevLoop Runner's design philosophy: human review before production deployment. No matter how capable the AI is, the final call belongs to a human. Finalize is that "human approval gate."

    This article covers how Finalize works, the execution steps, a pre-Finalize review checklist, and the merge workflow.

    What Is Finalize?

    Finalize converts a draft PR created by Dev Run into a "public PR."

    Loading diagram...

    Draft PR vs. Public PR

    StateDraft PRPublic PR (After Finalize)
    GitHub display"Draft" labelNormal PR
    Merge statusCannot mergeCan merge
    CI/CDMay run depending on configRuns normally
    Review requestsNot sentCan be requested
    PurposeReview AI-generated codeReady for production

    Dev Run creates draft PRs as a safety measure: "don't make AI-generated code immediately mergeable."

    What Finalize Does

    When you execute Finalize, the following processes run in order.

    1. Commit Cleanup

    During Dev Run, AI creates multiple commits across different phases. Finalize organizes these commits into meaningful units.

    Before (Pre-Finalize):

    abc1234 [Phase 5] Implementation: add dateFormat utility
    def5678 [Phase 5] Implementation: fix import path
    ghi9012 [Phase 6] Test Implementation: add dateFormat tests
    jkl3456 [Phase 7] Testing: fix failing test
    mno7890 [Phase 8] Documentation: update README
    

    After (Post-Finalize):

    xyz1234 Add dateFormat utility with tests and documentation
    

    Clean commit history makes future git log browsing and bug tracking much easier.

    2. PR Publication

    The draft PR is converted to a public PR. This enables review requests and merging.

    3. PR Description Finalization

    The report generated in Dev Run's Phase 9 (Report) is set as the PR description. It includes a summary of changes, test results, and impact scope.

    How to Execute Finalize

    Steps

    1. Open the job detail screen in DevLoop Runner
    2. Confirm Dev Run is complete (evaluation result is PASS or PASS WITH ISSUES)
    3. Review the PR content (see checklist below)
    4. Click the "Finalize" button
    5. Click "Execute" in the confirmation dialog
    6. Wait for Finalize to complete (usually 1-2 minutes)
    7. Verify the public PR on GitHub

    Conditions for Finalize

    ConditionDescription
    Dev Run is completeAll phases must be finished
    Evaluation is PASS or PASS WITH ISSUESFAIL evaluations cannot be finalized
    Not already finalizedPrevents double execution

    When Evaluation Is FAIL

    If the project evaluation is FAIL, Finalize cannot run. You have these options:

    1. Revise and re-run: Improve the Issue description and start a new Dev Run
    2. Rollback: Roll back to the problematic phase and re-run
    3. Manual fix: Manually fix the draft PR's branch, then resume Dev Run

    Pre-Finalize Review Checklist

    Before executing Finalize, verify the PR content with this checklist.

    Code Quality

    • Do changes meet the Issue requirements?
    • Do they follow coding conventions?
    • Is there no unnecessary code (debug logs, TODO comments, etc.)?
    • Are there no security concerns (hardcoded secrets, etc.)?
    • Is there no negative performance impact?

    Tests

    • Do all tests pass?
    • Is test coverage adequate?
    • Are error cases tested, not just happy paths?
    • Do test names accurately describe what they test?

    Documentation

    • Has documentation been updated?
    • Does documentation content match the code?
    • Are new feature usage instructions included?

    Impact Scope

    • Are there no unexpected file changes?
    • Is existing functionality unaffected?
    • Is external API/interface compatibility preserved?

    Post-Finalize Merge Workflow

    After Finalize completes, follow your normal GitHub PR merge workflow.

    Loading diagram...

    Choosing a Merge Method

    MethodBenefitBest For
    Merge CommitComplete history preservedWhen you want detailed change history
    Squash and MergeCondensed to 1 commitWhen Finalize has already cleaned up commits
    Rebase and MergeLinear historyWhen you want a clean branch integration

    Since Finalize already cleans up commits, Squash and Merge or Merge Commit is suitable in most cases.

    Post-Merge Verification

    After merging, verify:

    • CI/CD pipeline completes successfully
    • Deployment proceeds normally (if auto-deploy is configured)
    • Production behavior check (if needed)

    Finalize FAQ

    Q: Can I undo a Finalize?

    Finalize itself cannot be undone. However, since the public PR hasn't been merged yet, you can close the PR if needed.

    Q: Can I manually modify the draft PR before Finalize?

    Yes. You can add manual commits to the draft PR's branch before executing Finalize. Note that manual commits will be included in Finalize's commit cleanup process.

    Q: Can a team member run Finalize on my behalf?

    Yes. Any team member with repository access can execute Finalize, not just the person who ran Dev Run.

    Q: Can I Finalize multiple draft PRs at once?

    Each job's Finalize must be executed individually. However, you can Finalize multiple jobs in sequence.

    Summary

    • Finalize converts draft PRs to public PRs: The final step after Dev Run
    • It's a human approval gate: AI-generated code is never auto-merged
    • Commit cleanup happens automatically: Multi-phase commits are consolidated cleanly
    • Use the review checklist: Check code quality, tests, documentation, and impact scope
    • After Finalize, follow your normal merge flow: Verify CI/CD passes, then merge

    Finalize is DevLoop Runner's "safety valve." It ensures AI-generated code is thoroughly reviewed and confirmed before reaching production. This process is what makes AI-powered development trustworthy.

    Get Started with DevLoop Runner

    Auto-generate PRs from GitHub Issues. Let AI accelerate your development.