Repository: pvandervelde/release_regent
Affects: Release PR creation on non-release PR merge
Date: 2026-05-18
Summary
When a non-release PR is merged into the default branch, release-regent creates or
updates a release PR. The PR is always created as a non-draft regardless of the
release_pr.draft setting in release-regent.toml. Setting draft = true under
[release_pr] has no effect.
Configuration (correct — not the cause)
[release_pr]
draft = true
The key release_pr.draft maps to ReleasePrConfig.draft in
crates/core/src/config.rs. The configuration is not the problem.
Root Cause
ReleaseOrchestrator hardcodes draft: false in create_pull_request
In crates/core/src/release_orchestrator.rs, the CreatePullRequestParams literal
always sets draft: false:
// (inside the create-new-PR path)
CreatePullRequestParams {
title: title.clone(),
body: body.clone(),
head: branch_name.clone(),
base: default_branch.to_string(),
draft: false, // ← always false
}
OrchestratorConfig has no draft field
OrchestratorConfig contains no field for this setting, so there is no path from the
config to the call site even if lib.rs were to read it.
lib.rs never reads repo_config.release_pr.draft
OrchestratorConfig is constructed in handle_pr_comment and
handle_pull_request_merged without any reference to repo_config.release_pr.draft.
The other fields in ReleasePrConfig (title_template, body_template,
manifest_files, auto_detect_manifests) are wired up correctly; draft is the only
missing one.
Impact
Teams that use draft PRs as a review gate before a release PR becomes mergeable cannot
rely on release-regent to honour that workflow. The release_pr.draft setting is
silently ignored.
Fix
- Add a
draft: bool field to OrchestratorConfig (default false).
- In
lib.rs's handle_pr_comment and handle_pull_request_merged, set
draft: repo_config.release_pr.draft when constructing OrchestratorConfig.
- In
ReleaseOrchestrator, pass self.config.draft to every
CreatePullRequestParams construction site (both the create-new and
update-existing paths need checking).
Files to Change
crates/core/src/release_orchestrator.rs — add field, use it in create_pull_request calls
crates/core/src/lib.rs — thread repo_config.release_pr.draft into OrchestratorConfig
crates/core/src/release_orchestrator_tests.rs — add tests for draft: true path
Repository:
pvandervelde/release_regentAffects: Release PR creation on non-release PR merge
Date: 2026-05-18
Summary
When a non-release PR is merged into the default branch,
release-regentcreates orupdates a release PR. The PR is always created as a non-draft regardless of the
release_pr.draftsetting inrelease-regent.toml. Settingdraft = trueunder[release_pr]has no effect.Configuration (correct — not the cause)
The key
release_pr.draftmaps toReleasePrConfig.draftincrates/core/src/config.rs. The configuration is not the problem.Root Cause
ReleaseOrchestratorhardcodesdraft: falseincreate_pull_requestIn
crates/core/src/release_orchestrator.rs, theCreatePullRequestParamsliteralalways sets
draft: false:OrchestratorConfighas nodraftfieldOrchestratorConfigcontains no field for this setting, so there is no path from theconfig to the call site even if
lib.rswere to read it.lib.rsnever readsrepo_config.release_pr.draftOrchestratorConfigis constructed inhandle_pr_commentandhandle_pull_request_mergedwithout any reference torepo_config.release_pr.draft.The other fields in
ReleasePrConfig(title_template,body_template,manifest_files,auto_detect_manifests) are wired up correctly;draftis the onlymissing one.
Impact
Teams that use draft PRs as a review gate before a release PR becomes mergeable cannot
rely on
release-regentto honour that workflow. Therelease_pr.draftsetting issilently ignored.
Fix
draft: boolfield toOrchestratorConfig(defaultfalse).lib.rs'shandle_pr_commentandhandle_pull_request_merged, setdraft: repo_config.release_pr.draftwhen constructingOrchestratorConfig.ReleaseOrchestrator, passself.config.draftto everyCreatePullRequestParamsconstruction site (both the create-new andupdate-existing paths need checking).
Files to Change
crates/core/src/release_orchestrator.rs— add field, use it increate_pull_requestcallscrates/core/src/lib.rs— threadrepo_config.release_pr.draftintoOrchestratorConfigcrates/core/src/release_orchestrator_tests.rs— add tests fordraft: truepath